Day #7 - Mathematical Operations in Python

Day #7 - Mathematical Operations in Python

Introduction

This blog post is going to be pretty small. On day 7 of my python coding journey, I learned about Mathematical operators in Python.

So let's get started......

What is an Operator?

  • An operator is more like a function that can be used to perform different operations. Here we will discuss some mathematical operators.

  • In the next post, we will create our first PROJECT based on learnings till now.

  • We will use the mathematical operators that we learn in this post to create a calculator on Day 8

Arithmetic Operators

In the below table, I have curated the list of 7 common mathematical operators with examples

OperatorOperator NameExample
+Addition20+7
-Subtraction20-7
*Multiplication20*7
**Exponential20**5
/Division20/6
%Modulus20%6
//Floor Division20//6

Arithmetic Operators Explanation

OperatorOperator NameExplanation
+AdditionAdds numbers
-SubtractionPerforms Subtractions
*MultiplicationMultiplies numbers
**ExponentialThis means to raise to power. Example 2**4 = 2*2*2*2
/DivisionIt returns quotient
%ModulusIt returns reminder
//Floor DivisionIt rounds down the quotient

Resources Used

Conclusion

Thanks, guys for going through this blog post. I hope this post helps someone newbie like me and makes an impact in learning python. Using the Mathematical operations that I learned in this tutorial I will make my first Python project a calculator. So stay tuned.

Thank you if you read this post and have found this post useful of my learnings from Day #7 of python

See you in the next one.....


About Me

Hey Guys, I am Chintan Jain from CodeWithJain. I am a trader and content creator. I am also passionate about tech and hence wanted to explore the field of tech. I always wanted to learn to code so I watched many tutorials but procrastinated practising coding. To get into the habit of coding consistently I am starting to BLOG with HASHNODE on daily basis.

I will document my coding journey from scratch and share my daily learnings in a blog post on HASHNODE. I hope you all will enjoy my content and my coding journey.

So what are you waiting for, smash the FOLLOW and LIKE buttons and follow along my coding journey, a step to create more beautiful digital products and empower people.