input(), print() and a text menu: the same logic as the turtle courses, as text in and text out. Every Python extension starts here.
★ Challenge completeShow text, ask a question, store the answer and join numbers onto text.
Show text on the screen with print, and join pieces of text into one line with +.
Ask a question with input, store the typed answer in a name, and use it in what the program says back.
Start lessonJoin a number onto text by turning it into text first with str.
Start lessonTurn typed text into numbers, and check it first so a typo does not crash the program.
What input gives back is always text, so turn it into a number with int before calculating with it.
Start lessonAsk the typed text whether it is all digits with isdigit, and use an if to choose, so a typo gets an answer instead of a crash.
Start lessonRepeat with while, keep a running total, and read a whole guessing game.
Keep running lines with while for as long as a condition is true, so a program can keep asking until it gets what it needs.
Keep a total across the passes of a loop with +=, setting it to 0 once before the loop starts.
Start lessonRead a whole guessing game that uses loops, checks and a counter together, then change it and build a dice game from the same parts.
A menu that keeps showing, and test cases written as a table.
Put a menu inside while True, choose with if and elif, and leave the loop with break when the person picks quit.
Write test cases (what to type and what the program should reply) as lines that print True or False, and include a wrong choice.
Build a console app with a menu, a checked number and a total.
Read a working café till, change one thing and predict the result, then make a console app of your own with a menu, a checked number, a total and tests.
Start lessonProgress is saved in this browser only. Nothing is sent anywhere.
For teachers: Teacher guide (notes, answers, solutions, slides and worksheets)