Starlit Daily

📚 › Python: the friendliest first language

2. Variables and types

ستتم ترجمة هذا المقال تلقائيًا. يُعرض بالإنجليزية حاليًا.

A variable is a name that points to a value. Python finds the type itself: int for whole numbers, float for decimals, str for text and bool for True or False.

type(x) shows the type of a value.

عرض المثال

name = "Ayesha"
age = 21
print(name, age, type(age))

✍️ دورك الآن

Store 7 in x and 5 in y, then print their sum.

← العودة إلى الدورة