Module 1: Start coding
Write and run your first programs: print, numbers, names, text and input. A working bill calculator by lesson 4.
- Your first program: print() shows output and Python runs top to bottom; read an error from its last line: the type, the message, then the line number.
- Numbers and names: // drops the fraction, % gives the remainder, runs first and right to left; = points a name at a value, it is not an equation.
- Text and input: input() returns text; wrap it in int() or float() before doing maths, and str() a number before joining it to text.
- Types and neat output: Values have types (int, float, str, bool, None); print money with f"{x:.2f}"; names cannot start with a digit or be a keyword.
Ends with a 14-question checkpoint (80% passes) and a mini project: Canteen Counter: bill splitter with GST.