Goal
Build a console program that reads student names and scores, then prints summary statistics.
Learning Metadata
- Difficulty: Beginner.
- Estimated Time: 45-75 minutes.
- Prerequisites: All
01-foundationsmodules, especiallytypes-and-io,control-flow, andarrays-and-vectors. - Learning Focus: Integrate validated input, record storage, and summary statistics in one small end-to-end program.
Learning Outcomes
FND-TIO-02FND-CFL-02FND-FUN-01FND-SEQ-02
Quick Run
Run the checkpoint checker from the repository root. The starter is intentionally incomplete, so the first run establishes the work still to do:
python scripts/automation.py check-checkpoint --language python --kind project --level 01-foundations
Requirements
- Ask for number of students.
- Read each student name as a full line and score with numeric validation.
- Keep score input in the range
0to100. - Print all student records.
- Print minimum score, maximum score, and average score.
Milestones
- Model the input and domain rules.
- Implement the smallest end-to-end workflow.
- Add validation and boundary behavior.
- Refactor only after every configured case passes.
Concepts Practiced
- Input handling with
input. - Loops and conditionals.
- Lists and dictionaries.
- Basic statistics: min, max, average.
Sample Input
3
Ana Smith
91
Bob Lee
77
Carla Mendez
88
Sample Output
Students:
- Ana Smith: 91
- Bob Lee: 77
- Carla Mendez: 88
Average: 85.33
Minimum: 77
Maximum: 91
Common Pitfalls
- Accepting empty names.
- Accepting invalid scores without retrying.
- Dividing by zero when no students are provided.
Cross-Language Notes
- Compared with the C++ capstone, this version optimizes for quick readable progress while keeping the same summary goal.
- Relative to C#, Go, and TypeScript, dynamic values make the first complete program feel lighter but less guarded.
- The comparison to watch is fast iteration versus compile-time protection.
What To Check
- invalid score input is rejected or retried without corrupting later reads
- names with spaces stay intact from input to output
- reported average, minimum, and maximum match the entered records
Check Your Work
Implement the task in starter/, then run from the repository root:
python scripts/automation.py check-checkpoint --language python --kind project --level 01-foundations
Use --solution only after completing a full attempt. Each failed case reports targeted feedback without exposing the implementation.
Extension Ideas
- Add grade letters (A/B/C).
- Sort output by score.
- Print pass/fail counts using a threshold.
Content revision 1d0b3f4