Python က readable ဖြစ်တဲ့ programming language တစ်ခုပါ။ Web backend, automation, data, AI, scripting, security tools စတဲ့နေရာတွေမှာသုံးတယ်။ Beginner အတွက် syntax ရိုးပြီး output ကိုမြန်မြန်မြင်ရတာကြောင့် စသင်ဖို့ကောင်းတယ်။
1. python.org ကနေ Python install လုပ်ပါ 2. Install screen မှာ "Add Python to PATH" ကို check လုပ်ပါ 3. VS Code install လုပ်ပြီး Python extension ထည့်ပါ 4. Terminal မှာ version စစ်ပါ python --version pip --version
python မရရင် py --version နဲ့စမ်းပါ။
print("Hello Python")
print("Mg Mg")
print(100)
print("Total:", 5000)
# f-string
name = "Aung Aung"
age = 20
print(f"My name is {name}. I am {age} years old.")
name = input("Enter your name: ")
print(f"Welcome, {name}")
age = input("Enter age: ")
print(type(age)) # input က string အနေနဲ့ဝင်လာတယ်Python မှာ block ခွဲဖို့ curly braces မသုံးဘဲ spaces သုံးတယ်။ Usually 4 spaces သုံးပါ။
if True:
print("This is inside if")
print("Same block")
print("Outside block")# One line comment """ Multi-line note အနေနဲ့ သုံးလို့ရတယ်။ Documentation string လို့လည်းခေါ်တယ်။ """