Python Arithmetic Operators for Beginners

#Learning #Python through Chunks. Lets start journey together (Beginner to Master). Lets code together !! #ABCC - Any Body Can CODE Chunk 7: Operators (Math & Basic Actions in Python) Operators let you do things with your variables. We’ll start with the simplest category: arithmetic operators. Let’s keep this ultra‑simple. 🔢 1. Arithmetic Operators These are basic math symbols: +Addition -Subtraction *Multiplication /Division //Floor division %Remainder (mod) **Power/exponent To remember: 7 / 2   # 3.5 (normal division) 7 // 2  # 3   (floor division, drops decimals) 10 % 2  # 0 → even 11 % 2  # 1 → odd 2 ** 5  # 32 3 ** 3  # 27 CODE - Try them x = 10 y = 3 print(x + y)    # 13 print(x - y)    # 7 print(x * y)    # 30 print(x / y)    # 3.3333 print(x // y)   # 3 print(x % y)    # 1 print(x ** y)   # 1000 💡 Key things to remember / always gives float // gives integer (drops decimals) % gives remainder ** means power

To view or add a comment, sign in

Explore content categories