What you'll build
We give you the goal. You break it into steps and build the program yourself. No requirements list. No starter code. The exercise is the planning, not the typing.
Requirements
The must-do parts. If any are missing, we'll ask you to take another pass.
- The goal — build a program that tells the user how old they will be when they complete their degree.
- Decide for yourself what questions the program needs to ask, and in what order, to figure out the answer.
- The output is one clear sentence that includes the user's name, the age they will be when they finish, and the year they finish.
- Wherever the user types a number, your program treats it as a number for the math.
- The result is correct for any reasonable set of inputs, not just the example shown below.
Bonus, if you're feeling brave
- Before you write any code, plan your steps on paper or in a markdown cell. Attach a photo of the plan, or paste the plan as text, with your submission.
- Handle the edge case where the user is starting this year — the line about 'years until you begin' should read sensibly when that gap is zero.
Examples
What your program should look like when it runs. Lines starting with $ are typed by you; the rest is your program.
Example cell run
Your name: Amara
Birth year: 1999
Target start year: 2027
Program length in years: 2
Amara, you will be 30 years old when you complete your degree in 2029.How we'll grade it
Four checks, four points. Three or above is passing — we'll ask you to revise anything we can't tick.
| Check | What we look for | Pt |
|---|---|---|
| It runs | Starts cleanly. Asks every question it needs and prints a result without crashing. | 1 |
| Achieves the goal | Produces the right shape of output for the example below — a single sentence naming the user, the finishing age, and the finishing year. | 1 |
| Math is right | Works correctly on a second set of inputs the grader will try, not just the example shown. | 1 |
| Reads well | The output is a clean human sentence, not labelled debug lines. | 1 |