← Back to course
Code Crew G5 / Week 11 / Monday
1/6
Week 11 Β· Plan your capstone

Monday

Choose a project
// Choose, break it down, test it first
⏱ about 15 min

Monday: Choose a project

The fleet has mapped almost the whole star cluster. Mission Control sends a message: each Crew Engineer will build a capstone project.

"I will build all three ideas at once!" Rocket says. "Tonight!"

Raven reads the list of choices slowly. "What do you notice about what each project needs?"

"They each use different tools from our toolkit," Rocket says. "Lists, dictionaries, sorting, trees."

Nova blinks. "Here is a hint. A good choice starts with who will use it, and what it must do."

Three capstone ideas

ProjectWhat it doesMain tools
Mission plannerKeeps a list of tasks with times and shows them in orderlist of dictionaries, sorted() with a key, loops
Star quiz gameAsks questions, checks answers and keeps scoredictionary of questions and answers, if, a running total
Fleet inventory trackerCounts supplies, finds what is low, finds an item fast and counts the crewdictionary, sorting, binary search, a tree with recursion

Next week the whole crew builds the Fleet inventory tracker together, one part each day. It uses the most tools from this year.

You can also plan your own choice this week. With a grown-up, you can build it after the course.

MATCH EACH NEED TO A TOOL.
  • Read the question.
  • Tap your answer.
The quiz must look up the answer for each question.
The planner must show tasks from earliest to latest.
The tracker must count everyone in the command tree.
StatementTrue or false?
A good plan starts with who will use the program.?
Building three projects at once is the fastest way.?
The inventory tracker uses binary search.?
WHY THIS EXERCISEOne clear project, planned well, beats three rushed ones.
Try it
Ask a grown-up which of the three projects they would find most useful, and why.
Their answer is a user's point of view. Engineers ask for that before they build.

Practice lab: a tiny quiz

Here is a small piece of the Star quiz game idea. It checks answers and keeps score.

quiz = {"2 + 3": "5", "4 * 2": "8"}
answers = {"2 + 3": "5", "4 * 2": "9"}
score = 0
for q in quiz:
    if answers[q] == quiz[q]:
        score = score + 1
print("Score:", score)
What score does the program print?
What kind of container is quiz?
Which tool would the planner use to put tasks in time order? Type the function name.
Which search does the tracker use to find a name fast?
TOOL CHECK
  • Read the question.
  • Tap your answer.
Which tool keeps the quiz score?
What should the planner store for each task?
Which project uses recursion on a tree?
StatementTrue or false?
The quiz loop visits each question once.?
The answer to "4 * 2" was right.?
score starts at 0.?
Every capstone idea uses at least one loop.?
WHY THIS EXERCISEReading small pieces of a project helps you plan the rest.
If both answers were right, what score would the program print?
WHY THIS EXERCISEscore goes up by 1 for each match.

Great choosing! Tomorrow we break the tracker into small parts.