Beginner Codes/Python/Arithmetic & Math
6%

Instructions

Numbers & Math 🔢

Python oru super-aana calculator madhiri work aagum! Namba eppadi numbers and math calculations panni adha code-la use pandradhu nu pakalam.

1. Arithmetic Operators (Maths Symbols)

Maths-la varra madhiriye, Python-layum kootal (addition), kazhithal (subtraction) ellam panna symbols irukku. Idhuku peru dhaan Operators.

OperatorNameExampleTanglish Meaning
+Addition5 + 3Kootal (Add pandradhu)
-Subtraction10 - 4Kazhithal (Subtract pandradhu)
*Multiplication3 * 7Perukkal (Multiply pandradhu)
/Division15 / 4Vaguthal (Divide pandradhu). Idhu eppovum float result dhaan tharum!
**Exponent2 ** 3Power calculation (2 to the power of 3). 2 * 2 * 2 = 8
%Modulus10 % 3Meedhi (Remainder). 10-a 3 aala divide panna, meedhi 1 varum la? Adhu dhaan idhu. Even/Odd kandupudikka idhu romba use aagum!

2. Math With Variables (Variables vechu math pandradhu)

Maths calculations panni andha answer-a direct-a oru variable-la store pannalam.

# Simple aana math
result = 10 + 5
print(result)  # Output: 15

# Variables-a veche maths pannalam
score = 50
bonus = 20
total_score = score + bonus
print(total_score)  # Output: 70

3. Order of Operations (BODMAS / PEMDAS rule)

Oru periya math equation irundha, computer edha first pannum? Python PEMDAS rule-a dhaan follow pannum:

  1. Parentheses () - Brackets ulla irukuradhu mudhalla.
  2. Exponents ** - Power calculation rendavadhu.
  3. Multiplication * / Division / - Perukkal / Vaguthal moonavadhu.
  4. Addition + / Subtraction - - Kootal / Kazhithal kadaisiya.
# Inga first (3+5) add aagi, apram dhaan 2-aala multiply aagum!
total = (3 + 5) * 2
print(total)  # Output: 16

💡 Tip: Kuzhappama irundha, eppovum () brackets use pannidunga! Adhu dhaan safe.

Your Turn! (Unga neram!)

  1. 7 * 8 idhoda result-a calculate panni result nu oru variable-la store pannunga.
  2. Apram andha result variable-a print() pannunga.

Help

Arithmetic & MathExercise 6/7715 XP
❴❵ script.py
python.code
python
Loading...
Terminal
Terminal — python
Beginner Codes Terminal v1.0.0
─────────────────────────────────────
Ready. Click "Run Code" to execute...
Ready
Piston APIPYTHON0 lines