// 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
// Other
match_case_mistakes.py
5 mistakes almost every beginner makes with match / case. Version check, missing wildcard, case sensitivity, wildcard p…
// Cheatsheet
match / case — The Full Picture
match / case — The Full Picture. Basics, guards, normalization, match vs if/elif, vending machine pattern, common mista…
// Code Example
nested_for_loops.py
Nested for loops — a loop inside a loop. Inner completes fully before outer moves on. Total iterations = outer × inner.
// Code Example
for_if_nested.py
for + if in nested loops — filter at the outer level, inner level, or both. break stops the current loop only.
// Code Example
while_for_nested.py
while + for — while sets the pace, for does the work. break inside for stops only the for. Each loop has its job.
// Exercise
caesar_cipher_2.py
Caesar Cipher upgraded — nested loops encrypt a real word. Outer loop sets the target, inner loop finds and shifts it, …
// 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 …
// Other
nested_loops_mistakes.py
5 mistakes almost every beginner makes with nested loops. Indentation, break scope, counter placement, iteration count,…
// Cheatsheet
nested_loops_cheatsheet.pdf
Nested Loops & Patterns — The Full Picture. for+for, for+if, while+for, break scope, accumulators, common mistakes.
// Code Example
def_function.py
def — define a function once, call it anywhere. Parentheses required, indentation mandatory, defining doesn't run it — …
// Exercise
banner.py
Banner — def in action. One function, consistent output, call it as many times as you need. "=" * len(title) fits the b…
// Code Example
parameters.py
Parameters — pass values into a function, function uses them. One function, many possible inputs. Parameter in definiti…
// Code Example
default_parameters.py
Default parameters — a fallback value when you don't pass one. Required parameters first, defaults after. Override when…
// Exercise
username_generator_2.py
Username Generator rewritten with parameters — no input() inside. Pass what changes, keep what stays. Default prefix in…