📚 › Python: the friendliest first language
2. Variables and types
Este artículo se traducirá automáticamente. Por ahora se muestra en inglés.
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.
Ver ejemplo
name = "Ayesha"
age = 21
print(name, age, type(age))
✍️ Ahora te toca
Store 7 in x and 5 in y, then print their sum.