// resources
Resources
All
|
Cheatsheet
Code Example
Exercise
Template
Other
Achievement
|
Basics
Control Flow
Functions
Data Structures
Modules & Packages
Projects
Object-oriented programming
|
↑ oldest first
↓ newest first
// Exercise
password_strength_checker_2.py
Password Strength Checker upgraded — while True keeps asking, for checks every character. Flags reset on every attempt.…
// Exercise
hangman.py
Hangman — two players, one word. while keeps the game alive, two for loops handle display and guessing. continue skips …
// Exercise
banner.py
Banner — def in action. One function, consistent output, call it as many times as you need. "=" * len(title) fits the b…
// Exercise
username_generator_2.py
Username Generator rewritten with parameters — no input() inside. Pass what changes, keep what stays. Default prefix in…
// Exercise
bmi_calculator_2.py
BMI Calculator rewritten with parameters — no input() inside. Pass weight and height, function calculates and prints. C…
// Exercise
username_generator_3.py
Username Generator with return — the value is free. Store it, print it directly, pass it to another function. Three way…
// Exercise
bmi_calculator_3.py
BMI Calculator with return — three functions, three jobs. Calculate, categorize, print. return connects them, each can …
// Exercise
bmi_calculator_4.py
BMI Calculator with error handling — get_input() validates, calculate_bmi() calculates, get_category() labels. Three fu…
// Exercise
shopping_list.py
shopping_list.py — A shopping list that lives in a loop. Add items, remove them safely, quit when done. append(), remov…
// Exercise
grade_book.py
Grade Book — nested lists for three subjects, grade input, average per subject, overall average, and empty list protect…
// Exercise
even_numbers.py
Even Numbers — collect 6 inputs, filter with a function, return a clean list. Modulo, append, and a function that doesn…
// Exercise
tip_calculator.py
Tip Calculator — bill amount, service rating, dict lookup, tip and total calculation. A dict doing exactly what dicts a…
// Exercise
shopping_list_2.py
Shopping List upgraded — items with quantity and price, nested dict per entry, checkout with total. The list you built …
// Exercise
pet_shop.py
Pet Shop — nested dicts, view all, search by name, buy and mark as sold. A nested dict doing real inventory work.
// Exercise
temperature_converter_2.py
Temperature Converter — conversion formulas stored as tuples, looked up by mode, unpacked and applied. A tuple doing ex…