Operators & Input

Python me calculations aur user se data lena

Operators

Python me alag-alag tarah ke operators hote hain jo hume calculations aur comparisons karne dete hain:

Example:

a = 10
b = 3

print(a + b)   # 13
print(a - b)   # 7
print(a * b)   # 30
print(a / b)   # 3.333...
print(a % b)   # 1

User Input

User se input lene ke liye input() function use hota hai. By default ye string deta hai, agar number chahiye to convert karna padta hai.

Example:

name = input("Apka naam kya hai? ")
print("Namaste", name)

age = int(input("Apki age bataiye: "))
print("Next year aap honge:", age + 1)

Next Step

Ab seekhte hain Conditions (if/elif/else) ke baare me.