The app is designed to help me understand Python functions and control flow statements.
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")
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.
The if statement allows users to choose between options by using plus, minus, addition, or multiplication. Following that, the function is called.