Introduction
Welcome to my new blog post. On day 8 I finally created the first python project. I created a manual calculator wherein I gave 2 numbers as input and the mathematical operators that learned on day 7 gave me the output for the code.
So let's get started......
Creating Calculator
I created a manual calculator that performed the below operations on 2 numbers
Addition
Subtraction
Multiplication
Division
Remainder / Modulus
Floor Division
Exponential
Input & Output
Input - we manually entered 2 numbers and wrote the code to perform the above operations
Output - The calculator gives us the desired output based on the mathematical operations.
Code & Output
Code
print("This is my First Python Project \n")
print("Note: Inputs are provided manually \n\n\n\n")
print("****** Manual Calculator ****** \n")
a = 50
b = 4
print("We have taken 2 numbers a =", a , "and b =",b,"\n")
print("The Addition of ", a, "and" ,b, "is = " ,(a+b))
print("The Subtraction of ", a, "and" ,b, "is = " ,(a-b))
print("The Multiplication of ", a, "and" ,b, "is = " ,(a*b))
print("The Division of ", a, "by" ,b, "is = " ,(a/b))
print("The Remainder or Modulus of ", a, "by" ,b, "is = " ,(a%b))
print("The Floor Division of ", a, "and" ,b, "is = " ,(a//b))
print("The Exponential of ", a, "and" ,b, "is = " ,(a**b))
Output
Output
This is my First Python Project
Note: Inputs are provided manually
****** Manual Calculator ******
We have taken 2 numbers a = 50 and b = 4
The Addition of 50 and 4 is = 54
The Subtraction of 50 and 4 is = 46
The Multiplication of 50 and 4 is = 200
The Division of 50 by 4 is = 12.5
The Remainder or Modulus of 50 by 4 is = 2
The Floor Division of 50 and 4 is = 12
The Exponential of 50 and 4 is = 6250000
Resources Used
Conclusion
Thanks, guys for going through this blog post. This was a simple manual calculator that I created. It was fun and exciting building the first project indeed.
Thank you if you read this post and have found this post useful of my learnings from Day #8 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.