Skip to main content

Command Palette

Search for a command to run...

Day06-Exercise 01

Basic Calculator

Updated
1 min read
Day06-Exercise 01
C
I am Data Science student, has a little bit knowledge on Web Development. I also love writing and editing as my hobby. Passionate to explore the world.

Basic Calculator

Create a calculator capable of performing addition, subtraction, multiplication and division operations on two numbers. Your program should format the output in readable manner.

a = 50
b = 3

print("The value of", a, "+", b, " is: ", a + b)
print("The value of", a, "-", b, " is: ", a - b)
print("The value of", a, "*", b, " is: ", a * b)
print("The value of", a, "/", b, " is: ", a / b)

Here we try to do addition, subtraction, multiplication and division operations on two numbers.

<< Previously -------------------------------------------------- Next Lesson >>

100DaysofPython

Part 7 of 35

This series is for beginners in which we explore python language along with how it is used in data science and do some exercises and some python related projects.

Up next

Day07 - Typecasting in Python

Implicit Conversion and Explicit Conversion