Python Arithmetic Operators

JK 2014 
Created at  
7,068 0 0
OperatorDescriptionExample
% ModulusDivides left hand operand by right hand operand and returns remainder20 % 10 = 0
* MultiplicationMultiplies values on either side of the operator10 * 20 = 200
** ExponentPerforms exponential (power) calculation on operators10**20 =10 to the power 20
+ AdditionAdds values on either side of the operator.10 + 20 = 30
- SubtractionSubtracts right hand operand from left hand operand.10 – 20 = -10
/ DivisionDivides left hand operand by right hand operand20 / 10 = 2
//Floor Division - The division of operands where the result is the quotient in which the digits after the decimal point are removed. But if one of the operands is negative, the result is floored, i.e., rounded away from zero (towards negative infinity) −

9//2 = 4 and 9.0//2.0 = 4.0

-11//3 = -4

-11.0//3 = -4.0

Tags Arithmetic Operators Operators Python Facebook X
Comments 0
Similar posts
  1. Python Comparison Operators
    7,231
  2. Printing string n times
    7,056
  3. String concatenation by join()
    7,127
  4. Python Lists
    7,326
  5. Python String Operations
    7,397
  6. Python Data Types
    7,421
  7. Python Tuples
    7,154
  8. Python Sets
    7,077
  9. Python Dictionaries
    7,043
  10. Python Variables
    7,381
  11. Python Comments
    7,517
  12. Python Syntax
    7,394
  13. Python Conditions and If statements
    7,122
  14. Python While Loops/For Loops
    7,490
  15. Python Getting Started
    7,441
  16. Python Introduction
    7,091
  17. What is Python?
    7,705
  18. Python Functions
    7,058
  19. Python Lambda
    7,094
  20. Python Arrays
    7,077
  21. Python Classes/Objects
    7,448
  22. Python Inheritance
    7,182
  23. Python Iterators
    7,094
  24. Python Polymorphism
    7,075
  25. Python Scope
    7,054
  26. Python Modules
    7,082
  27. Code Chronicles - A Caffeine-Fueled Journey into Data Software Engineering
    7,351
  28. Machine Learning Types and Programming Languages
    7,223
  29. Python Tutorials for AP Computer Science Principles, Data Projects and High School Internship
    7,872
  30. Mastering Excel Data Manipulation with Python
    7,055
  31. Challenge: One Code Problem Per Day
    1,081
  32. Clean Python Environments: The Power of venv vs. Docker
    812
  1. Python Modules
    7,082
  2. Python Scope
    7,054
  3. Python Polymorphism
    7,075
  4. Python Iterators
    7,094
  5. Python Inheritance
    7,182
  6. Python Classes/Objects
    7,448
  7. Python Arrays
    7,077
  8. Python Lambda
    7,094
  9. Python Functions
    7,058
  10. Python While Loops/For Loops
    7,490
  11. Python Conditions and If statements
    7,122
  12. Python Dictionaries
    7,043
  13. Python Sets
    7,077
  14. Python Tuples
    7,154
  15. Python Comparison Operators
    7,231
  16. Printing string n times
    7,056
  17. String concatenation by join()
    7,127
  18. Python Lists
    7,326
  19. Python String Operations
    7,397
  20. Python Data Types
    7,421
  21. Python Variables
    7,381
  22. Python Comments
    7,517
  23. Python Syntax
    7,394
  24. Python Getting Started
    7,441
  25. Python Introduction
    7,091
  26. What is Python?
    7,705
Recently updated
  1. Michael Jackson's Billie Jean
    68
  2. Bootstrap vs. Tailwind CSS: Origins, Features, Pros & Cons, and How to Choose the Right Framework
    121
  3. The Complete Guide to Golang: History, Features, Real-World Uses, and Code Examples
    335
  4. Telemetry vs. Analytics: Understanding the Difference and Why It Matters
    212
  5. The Evolution and Production Reality of Agentic AI
    198
  6. How to Activate or Waive Your UIUC Student Health Insurance
    281
  7. Complete Guide to Building a Machine Learning Model
    316
  8. My life cuts at Las Vegas during Thanksgiving day holiday
    7,396
  9. The Cybercab Transformation: From Autonomous Taxi to Mobile Base Station
    342
  10. Harness vs. OpenClaw: Two Very Different "Agents"
    958
  11. Clean Python Environments: The Power of venv vs. Docker
    812
  12. What is Docker? Why is Docker also useful in a development environment?
    609
  13. UIUC 2026-2027 Academic Calendar
    1,565
  14. How to Build Llama 3 AI Apps with Python: Setup & User Prompts
    800
  15. Open-Source LLMs: The AI Revolution
    747
  16. Resume 2.0: Leveling Up for My First Software Gig
    2,191
  17. Not everyone will understand what this man just did
    1,820
  18. UIUC Dorm Guide: Find Your Perfect Fit !!
    1,579
  19. Unpacking IU's Shopper
    749
  20. Jackie Chan's Police Story: The Action Masterpiece
    646
  21. The IVE Story: Identity, 'I AM' Charts, and Influence
    947
  22. Tech Visionaries who graduated at UIUC - You are the Next Turn
    1,182
  23. Open Databases for Sex Crime Occurrences in the U.S.
    711
  24. Automatically copy text to the clipboard when dragging the mouse in the Cursor
    2,604
  25. My First Day at University of Illinois-Urvana Champaign
    1,179
  26. Sand, Sea, and a Splash of Fun at Newport Beach: A Family Adventure
    8,118
  27. Sun, Rocks, and Adventure: A Day at Joshua Tree National Park
    8,197
  28. Sipping the Stars: My Starbucks Adventure
    9,630
  29. Exciting explore at Sequoia National Park
    7,647
  30. My Life Shot at Death Valley
    1,688
  31. Ip Man fights with Muay Thai Master
    930
  32. Mad Clown - Don't Die
    1,009
  33. How to get Student Enrollment and Degree Verification at UIUC
    4,820
  34. LAX Thanksgiving Rush: A Joyful Reunion
    917
  35. ZO ZAZZ(조째즈) - Don`t you know (모르시나요) (PROD.ROCOBERRY)
    1,116
  36. FISHINGIRLS Unleashes Energetic EP 'Funiverse' Featuring Signature Track 'Fishing King'
    970
  37. 10CM - To Reach You (너에게 닿기를)
    1,151
  38. Feeling weak? Transform yourself at the UIUC ARC!
    1,567
  39. BOYNEXTDOOR - If I Say I Love You
    1,181
  40. The Future of Software Engineer - AI Engineering
    924
  41. G Dragon x Taeyang (Eyes Nose Lips, Power, Home Sweet Home, GOOD BOY) - LE GALA PIÈCES JAUNES 2025
    899
  42. Lie - Legend song by BIGBANG
    7,809
  43. Why ROLLBACK is useful when you work with Google Gemini CLI?
    826
  44. Reimbursement after Vaccination at McKinley Health Center
    1,012
  45. Gemini CLI makes a Magic! Time to speed up your app development with Google Gemini CLI!
    961
  46. Common Questions from UIUC school life in terms of CS Program
    1,113
  47. UIUC Immunization Compliance
    1,205
  48. LEE CHANHYUK's songs really resonate with my soul - Time Stop! Vivid LaLa Love, Eve, Endangered Love ...
    1,085
  49. LEE CHANHYUK - Endangered Love (멸종위기사랑)
    1,089
  50. Cupid (OT4/Twin Ver.) - LIVE IN STUDIO | FIFTY FIFTY (피프티피프티)
    863