Back

Challenge Set 1

Unlocks after Activity 1.6. Four challenges, three different kinds of work.

divider

What This Set Is For

Everything here uses what you already have: variables, four types, arithmetic, integer division, remainder, and interpolation. Nothing in this set needs a construct you have not been taught.

What is new is that nobody tells you the steps any more. You are given a result somebody wants, and working out the steps is the work.


Three Kinds of Work

These are not four of the same thing, and they are not all graded together.

  • A debug challenge gives you broken programs and asks you to classify, diagnose, repair, and test each fault.
  • A pseudocode challenge asks you to move between C# and the exam reference sheet's notation, in both directions.
  • A code challenge gives you a brief and asks you to extract the requirements yourself before you write anything.

How to Read a Brief

Here is the difference between a set of instructions and a real request. Instructions look like this:

Instructions — not what you will get
Prompt the user for the subtotal.
Prompt the user for the tip percentage.
Multiply the subtotal by the percentage divided by 100.
Print the tip and the total.

A real request looks like this:

A Brief
My bowling league splits the bill evenly at the end
of the night, except the league covers shoe rental for
everyone. Tell me what each person owes.

The second one never says “prompt,” never says “divide,” and never mentions a variable. It also leaves something genuinely unclear. You work that out first, on paper, before you write any code:

Requirements
Requirements for "bowling league"
INPUT
- total bill
- number of people
- cost of shoe rental
CALCULATE
- bill minus shoe rental
- that amount divided by the number of people
OUTPUT
- what each person owes
UNCLEAR - I had to decide:
- Is the shoe rental one price for everyone, or per person?
I assumed per person.

Noticing what is unclear matters as much as listing what is clear. Real requests are always missing something. Write down the gap, write down the decision you made, and move on — do not wait for permission.

This is the reference for every brief in the course. Later sets point back here rather than repeating it.


The Challenges

Review

Build

Time Split spells out its tasks. Pizza Split is the first one that gives you a brief instead, which is why the section above exists.


Which Homework These Feed

The two Review pages are collected together as one drop. The two Build challenges feed the build drop after this block, which draws on the code challenges unlocked so far — these two and the ones under Activities 1.4 and 1.5.

The dropbox says how many. This page only says what is available.

Commence Challenges