Skip to content

🧱 Module 01: Foundations

The building blocks of every program. Master these, and you'll have a solid base for everything else.


What's in This Module

Topic Description
01_variables_and_types Storing and naming data
02_operators Math, comparison, and logic
03_control_flow Making decisions with if/else
04_loops Repeating actions
05_functions_basics Creating reusable code blocks
06_input_output Getting and displaying data

Learning Objectives

By the end of this module, you will:

  • ✅ Store data in variables with appropriate types
  • ✅ Perform calculations and comparisons
  • ✅ Make your program take different paths based on conditions
  • ✅ Repeat code efficiently with loops
  • ✅ Organize code into reusable functions
  • ✅ Interact with users through input and output

Time Estimate

⏱️ 8-10 hours total for this module

Topic Time
Variables and Types 1-2 hours
Operators 1 hour
Control Flow 1-2 hours
Loops 1-2 hours
Functions 2-3 hours
Input/Output 1 hour

Prerequisites


Key Concepts Preview

Variables

name = "Alice"      # A string (text)
age = 25            # An integer (whole number)
height = 1.75       # A float (decimal number)
is_student = True   # A boolean (True/False)

Operators

total = 10 + 5      # Math: 15
is_adult = age >= 18  # Comparison: True
can_vote = is_adult and is_citizen  # Logic

Control Flow

if age >= 18:
    print("You can vote!")
else:
    print("Too young to vote.")

Loops

for i in range(5):
    print(i)  # Prints 0, 1, 2, 3, 4

while count < 10:
    count += 1

Functions

def greet(name):
    return f"Hello, {name}!"

message = greet("World")  # "Hello, World!"

Input/Output

name = input("What's your name? ")
print(f"Nice to meet you, {name}!")

Start Learning!

Begin with 01_variables_and_types — the most fundamental concept.