// 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
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…