Ibnovate Course 2 · The Rising Builders
⏱ 75 minLive session

Session 1 — Speak Python

Duration: 75 min · Format: live online

What you'll learn: by the end, you can open Google Colab, write and run Python, store values in variables, and use print(), math, and the three basic data types.

Soft skill focus — Curiosity

Today you'll also grow Curiosity. Your first lines of Python are a sandbox — the fastest way to learn a language is to keep asking "what happens if I change this?"

What you'll need


Hook

Think about these questions:

Here's the idea: computers are powerful but not clever — they do exactly what you tell them, in order, step by step. Writing those steps in a language the computer understands is called coding. Today, that language is Python — the same language that powers apps, AI, and even space missions.


Teach — Code is instructions the computer runs

You write instructions, the computer runs them and shows the output. Nothing more magical than that.

Look at this diagram — notice the three parts: the code you write, the Run button, and the output that appears:

A Python editor with code on the left, a Run button, and the output on the right

Type and run this in Colab:

name = "Sara"
print("Hi,", name)

Run it and watch the output appear: Hi, Sara.

Ask yourself: "The computer just obeyed an instruction — what exactly did I tell it to do?" (Answer: store the text Sara in name, then print Hi, followed by whatever is in name.)

⚠ Watch for the #1 confusion: it's tempting to expect the computer to "understand" the sentence. It doesn't — it only runs each line in order. If a line is wrong, it won't guess what you meant; it will error out.


Teach — Variables store information

A variable is a labelled box that holds a value so you can use it again later.

Look at this diagram — each box has a label on the outside and a value inside:

Three labelled boxes: name holds "Sara", age holds 13, score holds 95

Type and run this in Colab:

name = "Sara"     # text  (a string)
age = 13          # whole number (an integer)
is_student = True  # yes/no (a boolean)

print(name, "is", age, "years old.")
print("Next year:", age + 1)

Notice the three data types — text (a string), numbers (an integer), and True/False (a boolean). These are the building blocks of every program.

Ask yourself: "Why does age + 1 give 14, but if age were text it would break?" (Answer: you can do math on numbers, not on quoted text.)

⚠ Watch for: text needs quotes ("Sara"), numbers don't (13). And = means "store this value", not "is equal to".


Activity — Your first real code

Open your own Google ColabNew notebook, then work through these steps.

Type and run this in Colab:

my_name = "type your name here"
my_age = 12
print("Hello, my name is", my_name)
print("In 5 years I will be", my_age + 5)

Then change the values and run again, and try the math operators: * (times), / (divide), - (minus).

Watch out for the two errors nearly everyone hits — forgetting the quotes around text, and gluing text together with a space instead of a comma.

Debug Game. Here's some broken code — can you spot two mistakes before you fix it?

city = Cairo
print("I live in " city)

What are the two problems? Here's the fix:

  1. Text needs quotes: city = "Cairo".
  2. You can't glue text together with a space — use a comma: print("I live in", city).

Check yourself

Try these — then check your answers:

  1. What does print(3 + 4) print?7 — no quotes, so Python does the math. (With quotes, print("3 + 4") would print 3 + 4.)
  2. Which data type is True? → A boolean — it can only be True or False.
  3. Why does name = "Sara" use quotes but age = 13 doesn't?"Sara" is text (a string) and text needs quotes; 13 is a number and numbers don't.

Wrap-up


Tips & extra challenges

import pandas as pd

data = {"name": ["Sara", "Omar", "Lina"], "score": [95, 88, 73]}
df = pd.DataFrame(data)

print(df)             # the whole table
print(df.shape)       # (rows, columns)
print(df["score"].mean())   # average score

df is a DataFrame — a table of data, like a smart spreadsheet. Add a 4th person, then print the highest score with df["score"].max(). Next session you load a real dataset into one of these.

Vocabulary

Term Meaning
Code Instructions written for a computer
Variable A labelled box that stores a value
String Text, always inside quotes
Integer A whole number
Boolean True or False

Resources

Practice set

Practise on your own — extra exercises reinforcing variables, print(), math, and data types, easy to hard.

1. Predict the output: what does this print? → 10. No quotes, so Python does the math.

print(6 + 4)

2. Predict the output: what does this print, and why is it different from #1? → 6 + 4 (the literal text). Quotes make it a string, so no math happens.

print("6 + 4")

3. Name the data type of each value: "hello", 42, False, 3.5. → string, integer, boolean, and a float (a decimal number).

4. Fix the bug: this errors — find and fix two problems. → country needs quotes and print needs a comma: country = "Egypt" then print("I live in", country).

country = Egypt
print("I live in" country)

5. Write it: store your age in a variable age, then print how old you'll be in 10 years — as a number, not glued text. → e.g. age = 12 then print("In 10 years:", age + 10).

6. Write a rectangle calculator: store width = 8 and height = 3, then print the area. → use *: print("Area:", width * height) gives 24.

width = 8
height = 3
# print the area here

7. Trace it (hard): after these lines run, what does the final print show? → 20. x becomes 10, then x + x is 20 (the variable is re-read at print time).

x = 5
x = x + 5
print(x + x)

Going deeper (optional)

If you're flying through this, here's a bonus — a string is really a sequence of characters you can measure and combine, no new tools needed:

name = "Sara"
print(len(name))        # 4  — how many characters
print(name + " Ali")    # Sara Ali  — + joins (concatenates) strings
print(name * 3)         # SaraSaraSara  — * repeats a string

Notice the twist: + on numbers adds (3 + 47), but + on strings joins them ("3" + "4""34"). Same symbol, different job depending on the data type — a first taste of why keeping strings and numbers straight matters. Try building a full greeting by joining several strings, then measure its length with len().

Common mistakes & fixes

What's next

Session 2 — Playing with Data: you'll use lists and loops (and Pandas, if you want more) to store and explore many values at once.

Ibnovate · Build · Innovate
Type to search · Esc to close
Welcome back
Sign in to continue building.
Accounts are created by Ibnovate — ask your instructor for your login.
🔒