Programming Fundamentals
Cheat sheet
Programming fundamentals on one card
Programming fundamentals on one card: screenshot this
Quick check · tap an answer to continue
Lesson notes
Key points
- Data type: Defines which values a variable holds and which operations are allowed.
- if / elif / else: Runs exactly one branch, the first whose condition is true.
- for vs while: Use for over a known sequence; while until a condition becomes false.
- Function: A named block taking parameters and returning a value to the caller.
- Scope: Variables made inside a function are local and vanish when it returns.
- Debugging: Reproduce the bug, isolate it with prints or breakpoints, fix, then retest.
Takeaway: Types, branches, loops, functions, scope, debug: in that order.
Quick check: What happens to a local variable after its function returns?
- It is no longer accessible
- It becomes a global variable
- It keeps its last value forever
Local variables live only in the function's scope during the call.
Lessons like this, for your syllabus.
Short narrated study videos written for your course, level and exam. Free to start.
Get lessons for your own syllabus