← Python

Basic Data Types

Python values have a type: int (whole number), float (decimal), str (text), or bool (True/False)

What it does: Numbers with a decimal point are floats in Python. Text wrapped in quotes is a string (str) in Python. A whole number without quotes is an integer. 42 has no decimal point — it's an integer. Any value in quotes is a string — floats are numbers like 3.14. Even 0.0 is a float — it has a decimal point. The quotes make it a string — quotes override the decimal point. '25' is a string — you can't do maths with it directly. Use int('25') first.

Common mistakes: Line 2 has a stray quote. Should be: age = 15. Line 2 is missing quotes. Should be: city = "Melbourne".

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a journey and assign it to your class.

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What type is "Alice"?
IntegerString
Matches
❌ '25' + 1
Error: Can't add str and int
Applying
Meanings
Term
name = "Alice"
Meaning
Strings are text in quotes.
Practice
name = "Alice"
Testing
Gaps
name =
Check Answer
Spots
1name = "Alice"
2age = 15"

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Deer' badge — Forest Streak, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What type is "Alice"?
A. Integer
B. String ✓
Text in quotes is a string — even if it looks like a name or a word
2. What type is 15?
A. Integer ✓
B. String
A whole number without quotes is an integer
3. What type is 5.5?
A. Integer
B. Float ✓
Numbers with a decimal point are floats — integers have no decimal
4. Which is a string?
A. "100" ✓
B. 100
The quotes make it a string — "100" is text, 100 is a number
5. What type is 42?
A. Float
B. Integer ✓
42 has no decimal point — it's an integer

Match the Pairs

'25' + 1 Error: Can't add str and int
year_born = 1989.0 Error: float value, not an int
score = 4.5 Valid: float type
name = 'Alice' Ok: str type
print(int('25')) Output: 25
print(float('3.14')) Output: 3.14

Key Term

name = "Alice"
Strings are text in quotes.~~age = 15

Fill in the Blanks

1. name = "Alice"
2. age = 15
3. height = 5.5
4. score = int("100")
5. city = "Melbourne"

Spot the Error

Question 1
A name = "Alice"
B age = 15"
C print(age)
Line B — Line 2 has a stray quote. Should be: age = 15
Question 2
A score = 100
B city = Melbourne
C print(city)
Line B — Line 2 is missing quotes. Should be: city = "Melbourne"
Question 3
A name = 'Bob'
B age = 12
C height = 5,8
Line C — Line 3 uses a comma not a decimal point. Should be: height = 5.8
Question 4
A name = 'Alice'
B score = 85
C total = score + name
D print(total)
Line C — Line 3 tries to add an int and a string. score is an integer, name is a string -- they can't be added.
Question 5
A name = 'Charlie'
B age = 15
C height = 5.8
D city = 'Melbourne
E print(name)
Line D — Line 4 is missing a closing quote
For Teachers

Create a free class, add this module to a journey, and track who's stuck.

Create a free teacher account →

No credit card. No setup fee. Make a class and invite students in under three minutes.

For Students

Practice this topic interactively, track progress, and unlock badges.

Start Learning Free →

Have a class code?