1. Engineering
  2. Computer Science
  3. function name quickmaths parameters a number float a number float...

Question: function name quickmaths parameters a number float a number float...

Question details

Function name​: quick_maths()

Parameters: a number (float), a number (float), an operation (string)

Returns: a float

Description: You’re trying to do your math homework, and you realized that you can

write a program to do all the simple operations! The five possible operations are “+”, “-”,

“*”, “/”, and “%”. Based on the operation that is passed in, perform the operation on the

two numerical parameters. The first parameter should always go first in the operation.

Return the result of the operation rounded to two decimal places. If the operation is not

one of the five listed above, return “That operation does not exist!”

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution