← All lessons

Final project: the plan

Sign in · Sign up

Lesson 13.8

A project is built from four parts: idea → screen → data → logic.

Name: Guess the number
Does: a guessing game
Input: a number
Keeps: the secret number and the attempts
Logic: higher/lower hints
  • the idea — one sentence: what the project does and for whom;
  • the screen / input — what the user sees and types;
  • the data — what the program remembers while it runs;
  • the logic — what happens after the input.

The rule: if the project doesn't fit into five lines, it's too big. Narrow it down: one game, one function, one clear goal.

The check gives the project project — a dictionary with the fields from the plan. Try to build it: check that the plan is complete (are all four parts there) and print:

  1. Project: <name>;
  2. Plan ready: <yes or no> — all four fields are filled with non-empty strings;
  3. Logic: <what happens>.
Hint

The plan is complete if all four fields are non-empty.

Check it with all(...) over the list of parts and .strip() for spaces. Print the name, the answer yes/no and the logic field.