Question: use python Instead of using a conditional, like we did before, we will make a series of functions to do all the mathematical operations that
Instead of using a conditional, like we did before, we will make a series of functions to do all the mathematical operations that we want to do Define four functions, called summation, subtraction, multiplication, and division Each of them will take two inputs num and num2 (that could be int or float), and use them as follows: summation will add numi to num2 and return the result subtraction will carry out subtraction: numi minus num2 and return the result multiplication will multiply num1 by num2 and return the result division will divide numi by num2 and return the result In 1: # YOUR CODE HERE raise NotImplementedError() In 1: assert callable(summation) assert isinstance(summation (2, 2), int) assert isinstance summation (2.5, 1), float) assert summation(1, 1) - 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
