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.
| Operator | Name | Example | Tanglish Meaning |
|---|---|---|---|
+ | Addition | 5 + 3 | Kootal (Add pandradhu) |
- | Subtraction | 10 - 4 | Kazhithal (Subtract pandradhu) |
* | Multiplication | 3 * 7 | Perukkal (Multiply pandradhu) |
/ | Division | 15 / 4 | Vaguthal (Divide pandradhu). Idhu eppovum float result dhaan tharum! |
** | Exponent | 2 ** 3 | Power calculation (2 to the power of 3). 2 * 2 * 2 = 8 |
% | Modulus | 10 % 3 | Meedhi (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:
- Parentheses
()- Brackets ulla irukuradhu mudhalla. - Exponents
**- Power calculation rendavadhu. - Multiplication
*/ Division/- Perukkal / Vaguthal moonavadhu. - 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!)
7 * 8idhoda result-a calculate panniresultnu oru variable-la store pannunga.- Apram andha
resultvariable-aprint()pannunga.
Help
Arithmetic & MathExercise 6/77 • 15 XP
❴❵ script.py
Terminal