Press ▶ Run to see what your program does.
Lesson 33: Level 4 test: Python Starter
Level 4, Python First Steps. Print, variables, maths, input and f-strings. It follows lesson 32, Practice: the snack shop. Next comes lesson 34, Decisions: if and else.
What the lesson explains
Python Starter. Everything from Level 4. No hints this time. Run your code and read what it prints.
What you do first
Show what you know. Which line prints the word Hello? The answer: "print("Hello")".
The code on the screen
Python Starter. The editor shows 3 lines: name = "Ada" / age = 10 / print(f"{name} is {age}, and next year {age + 1}."). Run it, and it prints "Ada is 10, and next year 11.".
What you practise
Test, "Show what you know": Which line prints the word Hello? The answer: "print("Hello")". Then: Make score = 5 and print it. One way to write it: score = 5 / print(score). It prints: 5. Then: What does print(9 // 2) print? The answer: "4". Then: Fix it so it prints Level 4. The editor opens with: print("Level " + 4). One way to write it: print("Level " + str(4)). It prints: Level 4. Then: What does input() always give back? The answer: "A string". Then: name = "Sam", then print(f"Hi {name}!"). What does it print? The answer: "Hi Sam!".
Challenge, "A greeting machine": Ask a name and welcome them. One way to write it: name = input("Name? ") / print(f"Welcome, {name}!"). Answer its question with Ada. It prints: Name? Ada / Welcome, Ada!.
Help in every lesson
Everything happens on a pretend computer in your browser, so nothing touches your real files. PlayBuddy and PlayType stand beside the board, cheer you on and say when it is your turn.
This is a test, so the green ring stays away: you show what you know on your own.
Stars
The lesson has 7 things to do. Up to one slip in ten gives three stars, up to one in four gives two, and finishing always gives at least one. Stars and progress are saved in this browser only; there is no account.
About DayOneCode
DayOneCode is an independent learning site, not affiliated with or endorsed by Anthropic. Claude and Claude Code are trademarks of Anthropic.