Ainsteinx Logo
Ainsteinx
👤
Welcome to Ainsteinx
Login

Change Language

Currency

Home
Blog
Services
All lessons
EP.2 Python for Laos

Variables: boxes for your data

name = "ສົມພອນ"
age = 20
height = 1.68

print(name, age, height)
Video coming soon
EP.2 Basics

Variables: boxes for your data

A variable is a labelled box that can hold anything.

Use = to put a value into a variable: the name goes on the left, the value on the right.

Variables can hold text (str), whole numbers (int) and decimals (float), and you can change the value at any time.

ep02-variables.py
name = "ສົມພອນ"
age = 20
height = 1.68

print(name, age, height)

Output

ສົມພອນ 20 1.68
  • #PythonສຳລັບຄົນLaos
  • #Python
  • #ຮຽນໂປຣແກຣມ
  • #ບອກຕໍ່ຄວາມຮູ້
  • #shorts

Watch and share on