Writing Code from Zero
A guided first coding task focused on output, input, menus, and building confidence from a blank file.
This activity is the first structured build from a blank file. It works well after setup and before the Explorer chapters.
Related Pages
- Write Python code yourself (no copy–paste solutions)
- Make the computer ask questions and respond
- Create your first menu-based program
Step 0 — Setup (5 minutes)
- Download the 'Level 1 - Template.py' file attached to this post.
- Open Thonny
- Open the Level 1 - Template.py file you just downloaded
- Save it as arcade_hub_L1_your_name.py
Step 1 — Output: make Python talk (10 minutes)
Your first goal is to print a welcome message.
Write Python code that prints:
WELCOME TO ARCADE HUB
Step 2 — Input: ask the user something (10 minutes)
Now make the program ask for the player’s name.
- Ask the user for their name
- Store it in a variable
- Print a greeting using that name
input() and a variable.Step 3 — Decisions: your first menu (15 minutes)
Your program should now show a menu.
1) Show player badge
Q) Quit
Ask the user to choose an option, then:
- If they choose 1, print their name
- If they choose Q, print goodbye
Step 4 — Loop: make it repeat (15 minutes)
Right now, your program probably runs once and stops.
- Put your menu inside a loop
- Only quit when the user chooses Q
Post your tested, working code for Arcade Hub v1 below for peer feedback. Remember, code is never perfect. Coding is all about learning through building, testing, and improving.
- Your full code (use the template attached and copy/paste from Thonny)
- The “Student Submission Box” section at the top of the template filled in
- A short title: Arcade Hub v1 - [Your Name]
Choose one classmate's posts and reply using this structure:
- Do not paste “fixed” versions of someone else’s code
- Do not roast people - we’re here to build skills
- If you found a bug, explain it clearly and kindly
Be specific. Be kind. Be useful.
Example sentence starters:
- “I like how you…”
- “One thing that works really well is…”
- “A small improvement you could try is…”
- “I tested your code by doing ___ and it…”
When you reply to a classmate, quickly check these items. You can copy the checklist into your reply and tick what you see.
- ⬜ The program prints a welcome message
- ⬜ The program asks for the user’s name and stores it in a variable
- ⬜ The program prints a greeting that uses the name
- ⬜ A menu is displayed with at least: 1) Player badge and Q) Quit
- ⬜ Choosing 1 prints the player badge (their name)
- ⬜ Choosing Q quits the program (loop ends)
- ⬜ Invalid choices show