PYTHON EXAMPLE · WORKING REFERENCE

Add Two Numbers

Do numeric values ko + operator se add karke result print karo.

Working code

a = 10
b = 20
total = a + b
print(total)
Run Code ▶

Expected output

30

How it works

a aur b numbers store karte hain. + arithmetic addition karta hai aur result total me store hota hai.

Try Yourself

x = 25
y = 15
print(x + y)

Learn this concept

Read related Python Tutorial →