calc

Simple Calculator

Here we build a simple calculator program which have Basic Mathematical operation like Addition,Subtraction,Multiplication and Division depending upon the input from the user.

To build this program you should hav the prior knowledge of

 following Python programming topics:

The source code of the progrma

Sample output

Welcome to a calculator simulation using Python.

We have the following options in this program:

1.Add

2.Subtract

3.Multiply

4.Divide

Please enter the number in accordance with your choice: 1

Enter first number: 2

Enter second number: 4

2.0 + 4.0 = 6.0

Let’s do next calculation? (yes/no): yes

Please enter the number in accordance with your choice: 2

Enter first number: 4

Enter second number: 2

4.0 – 2.0 = 2.0

Let’s do next calculation? (yes/no): 3

Please enter the number in accordance with your choice: 3

Enter first number: 5

Enter second number: 4

5.0 * 4.0 = 20.0

Let’s do next calculation? (yes/no): n