Add, Subtract or Multiply Python exercise
Write a program that asks the user for three numbers. Then ask them if they would like to add, subtract, or multiply these numbers. Perform the chosen operation on the values, showing the operation being performed (use numbers in order even if a negative value is produced!)
Write three functions, one for each mathematical operation.
For example, if this was the input given:
What is the first number?: 3
What is the second number?: 5
What is the third number?: 6
Choose an operation (add, subtract, multiply): multiply
Plain text
The following output should be given:
3 5 6 = 90
Plain text
Note: Do not use the variable name “operator”. Also, be sure to print a notice if an invalid operation is chosen!
Write a program that asks the user for three numbers. Then ask them if they would like to add, subtract, or multiply these numbers. Perform the chosen operation on the values, showing the operation being performed (use numbers in order even if a negative value is produced!)
Write three functions, one for each mathematical operation.
For example, if this was the input given:
What is the first number?: 3
What is the second number?: 5
What is the third number?: 6
Choose an operation (add, subtract, multiply): multiply
Plain text
The following output should be given:
3 5 6 = 90
Plain text
Note: Do not use the variable name “operator”. Also, be sure to print a notice if an invalid operation is chosen!