Question: 1. Write a program as foliow: a. Create a function that calculates the sum of the three random whole numbers (Hint: use Math methods introduce
1. Write a program as foliow: a. Create a function that calculates the sum of the three random whole numbers (Hint: use Math methods introduce in Chapter 4). The function then prints the three numbers and the sum of the three numbers. b. Pass the above function to the higher order function "repeat(n, action)" shown in Chapter 5 to calculate 6 sums of three random numbers. You can not modify the repeat function in the textbook in any way. This helps you understand how functional programming works. 0 points if not using the repeat function to perform the task 10 points off if the repeat function is modified The following is an example output: 8+1+7=165+7+6=183+7+1=116+0+6=124+6+8=184+6+2=12
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
