← All coursesDiscover & build
Python Basics 1
First real programs in Python: print, variables, numbers, strings, decisions, loops, lists, dictionaries — an ATM and a restaurant.
A 13-session trainer-led introduction to Python, authored from Little Inventors' Python Basics classes. The child writes and runs every program themselves inside Learnbit, with the trainer teaching from the pages in the left panel, and finishes with a Bank ATM and a Virtual Restaurant program of their own.
13 sessionsAges 10–14Trainer guided
What you’ll build and learn
- A child who can read and write short Python programs: printing, variables and input, arithmetic and comparisons, strings, decisions with if, loops with for and while, and lists, tuples, sets and dictionaries — and who has built an ATM and a menu-driven restaurant from all of them.
01Hello, Python
What Python is and where it runs, the first print() program, comments, and how to read the three most common error messages.45 min
02Variables and Input
Variables as labelled boxes, the naming rules and keywords, printing with commas, f-strings, sep and end, and asking the user with input().45 min
03Numbers, Booleans and Type Casting
The int, float, str and bool types, arithmetic including // and %, comparison and logical operators, and casting between types with int(), float(), str() and bool().45 min
04Strings: Index and Slice
Strings and multiline strings, len() and +, in / not in, indexing from 0 and from the end, slicing with start, stop and step, and escape characters.45 min
05String Methods
Methods as actions that belong to a value: case changes, count/find/replace, is-checks, split/join/strip, alignment, and format. Ends with a name-badge project.45 min
06Decisions: if, elif and else
Programs that choose: if, else and elif, indentation as the block, comparison and logical operators inside conditions, nested ifs, and the one-line if.45 min
07Loops: for and while
Repeating with for and range(), the while loop and its condition, break and continue, and a loop that keeps asking until the answer is right.45 min
08Patterns and Nested Loops
A loop inside a loop: rows and columns, printing star and number patterns, end="" to stay on a line, and multiplication tables.45 min
09Lists
Making lists, indexing and slicing them like strings, changing them with append, insert, remove, pop and sort, looping over them, and asking with in.45 min
10Tuples and Sets
Tuples: lists that cannot change, unpacking and swapping; sets: no duplicates, no order, add and remove, and union, intersection and difference between two sets.45 min
11Dictionaries
Key-value pairs: making a dictionary, reading with [ ] and get(), adding and changing, deleting, looping over keys and values, and a dictionary as a record.45 min
12Project: The Bank ATM
The ATM program from class: accounts kept in a dictionary of lists, a log-in that checks the username and PIN, a menu in a while loop, deposit and withdraw that change the balance inside the dictionary, a withdraw that refuses when there is not enough, and a printed receipt.45 min
13Project: The Virtual Restaurant
A whole program from everything in the course: a menu in a dictionary, a while loop for ordering, if-elif for choices, a list of what was ordered, a total bill and change.45 min