──────────────────────────────────────

4. Broadcast from Base Camp · Build a Mission Card

Build a reusable mission card that recalculates meals when the crew size changes.

Lesson files · lessons/first-programs/mission-card

Before you start
- Multiply two named values to find a total.
- Put a variable in a label with an f-string.

By the end
- Use the crew size from Program input in both a label and a calculation.
- Test a larger crew and a crew of zero.

Where you can use it
Make a snack planner for a group. Enter the headcount each time and let the planner recalculate what to pack.

Store the mission name, crew size and meals per person before calculating and printing the result. Use the same crew variable for both the label and the multiplication so the card stays in sync.

Keep the starter's crew = int(input()) line. It reads one line from Program input and turns it into a whole number. The next module shows how to write that step yourself. Try a different crew size by changing the number in Program input and running again.

Predict
In the worked example, which line should you change to send more people?
- The text printed by the f-string.
- The assignment to crew.

Worked example (example.py)

mission = "Ice Survey"
crew = 2
print(f"{mission} has {crew} crew.")


Example result
Ice Survey has 2 crew.

Create a mission card for Moon Relay with two meals per crew member. Use the crew size from Program input. Print Mission: Moon Relay, then Crew: and Meals: with their numbers on separate lines. For a crew of 3, the card should show 6 meals.

Starter program (starter.py)

mission = "Moon Relay"
crew = int(input())
meals_each = 2
print(f"Mission: {mission}")


Starter input
3

Hint
Get the first two output lines working. Then calculate meals = crew * meals_each and insert meals into the third line.

Case 1. Try the sample
Input
3
Expected output
Mission: Moon Relay
Crew: 3
Meals: 6

Case 2. Larger crew
Input
5
Expected output
Mission: Moon Relay
Crew: 5
Meals: 10

Case 3. Empty crew
Input
0
Expected output
Mission: Moon Relay
Crew: 0
Meals: 0

Project checklist
Run the sample case.

Project checklist
Try one different case and explain what happened.

Marking criterion
Program behaviour (4 points)
Each required behaviour works on the supplied cases.

Marking criterion
Use of the lesson concept (3 points)
The code uses the main idea in a clear, purposeful way.

Marking criterion
Test evidence (2 points)
The reflection describes a case, its expected result and what happened.

Marking criterion
Explanation (1 points)
The learner explains a change or design decision in their own words.

Stretch
Make a card for a new mission. Decide how many meals each person needs, then choose a crew size and predict the result.

Reflect
Show a change to the crew size and explain why the meal count changed.

Check your prediction
The assignment to crew. Changing the source value keeps the label and future calculations in sync.
