Tsallaka zuwa abun ciki
Justice Tech School

Variables and Types

You create a variable by assigning to it. There is no let or const. Common types are str, int, float and bool. type() tells you which one a value is.

Example
name = "Ada"
age = 21
height = 1.65
is_student = True
print(name, age)
print(type(age))

Result

Ada 21
<class 'int'>

Exercise

Store the number 10 in x.

x  10

Quiz Test

Which is a float?

These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.