/Calculator-With-Python

Built a calculator with python

Primary LanguagePython

Calculator-With-Python

The app is designed to help me understand Python functions and control flow statements.

How The App Was Developed

Functions

The app has four features. Each function performs the operations of addition, multiplication, subtraction, and division. example :

def add(first_number, second_number):
    answer = first_number + second_number
    print(str(first_number) + " + " + str(second_number) + " = " + str(answer) + "\n")

While-Loop

I was able to use the while loop to allow users to select their preferred operator (+, -, *, /) and enter the number to be calculated. The loop ends when the last option is chosen.

If statement

The if statement allows users to choose between options by using plus, minus, addition, or multiplication. Following that, the function is called.