1.63 Simulation
In this simulation, you will apply your understanding of sequence, selection, and repetition by designing and implementing a Python solution.
Purpose
The simulation challenges students to:
Decompose a larger problem into logical steps
Write precise pseudocode and visualise logic with flowcharts
Implement combined control structures in Python
Reflect on their design, testing, and problem-solving process
Scenario
Students will design a menu-based virtual vending machine that:
Displays at least three item choices
Allows the user to select, confirm, or cancel a purchase
Loops until the user chooses to exit
This task requires multi-way selection and looping structures.
Accessing the simulation notebook
Students can download the simulation notebook directly from the repository:
⬇ Download the simulation notebook
They should work in JupyterLab, VS Code, or another .ipynb
-compatible editor, completing all sections.
Learning outcomes
By completing this simulation, students will:
Apply pseudocode and flowcharting to plan a program
Implement Python code using sequence, selection, and repetition
Handle user input and invalid selections robustly
Reflect on the design and testing process to improve future work
Submission
Students should submit:
Completed
.ipynb
file with all sections filled outAny attached or linked flowchart images
Commit and push their work to their personal repository
Last updated
Was this helpful?