Day 2 — Variables, Memory & Type

Python Starter Club • Programmer’s Picnic

Today we learn how Python remembers information and how we can inspect what the computer sees.

🎨 Comic — How the Computer Remembers

Day 2 Python Variables Comic

🧠 What Is a Variable?

A variable is a named container used to store data.

age = 20
name = "Anita"
    

Here:

🖨️ Using print()

print(age)
print(name)
    

print() shows what is inside the container.

⌨️ Taking Input from User

city = input("Enter your city: ")
print(city)
    

⚠️ Important:
input() always gives text (string)

🔍 Checking Type with type()

age = input("Enter age: ")
print(type(age))
    

Even if you type a number, Python still sees it as text.

📝 Day 2 Task

1️⃣ Ask user for name
2️⃣ Ask user for city
3️⃣ Ask user for age

Print:

Hello <name> from <city>. You are <age> years old.
    

✔ Use print()
✔ Observe type()

🪔 Key Takeaway

Variables give memory.
print() shows memory.
input() brings data.
type() removes confusion.

Tomorrow, we start calculations.