Operators are used to performing operations on any given data stored inside variables.
And arithmetic operators makes mathematical operations possible on operands in a program.
I know! I know! This is a basic concept! But let's make it fun!
Starting with addition and subtraction
Addition 9
Subtraction 8
Now, Multiplication and Division
Multiplication 314.0
Division 2.0
Special arithmetic operators
-
Floor division -
//
: rounds of the result to the nearest whole number. -
Modulus -
%
: produces the remainder of the numbers Output:
Floor Division 3
Modulus 1
- Exponentiation - ** : produces the power of given numbers Output:
Exponentiation 0.025517964452291125
Exponentiation 37.78343433288728
Best Resources
Python Blog Series: A Blog series where I will be learning and sharing my knowledge on each of the above topics.
Learn Python for Free, Get Hired, and (maybe) Change the World!: A detailed roadmap blog by Jayson Lennon (a Senior Software Engineer) with links to free resources.
Zero To Mastery Course - Complete Python Developer: A comprehensive course by Andrei Neagoie (a Senior Developer) that covers all of the above topics.
Who Am I?
I’m Aswin Barath, a Software Engineering Nerd who loves building Web Applications, now sharing my knowledge through Blogging during the busy time of my freelancing work life. Here’s the link to all of my socials categorized by platforms under one place: https://linktr.ee/AswinBarath
Thank you so much for reading my blog🙂.
Top comments (0)