Question: 1. Write the following function: def printProductEvenInts(even1, even2): 'Let prod be the product of even ints starting at even_1 up to and including even2. The



1. Write the following function: def printProductEvenInts(even1, even2): "'Let prod be the product of even ints starting at even_1 up to and including even2. The function prints out: even2 even2 prod P = 1 for n in range (even1, even2+1,2): p*= n print(eveni, ', even2, # Sample run: # printProductEvenInts(2,6) # 2 6 48 p) 2. What is the result of the following runs? Explain the output for each using your code. printProductEven Ints(-10,-2) printProductEvenInts(-10,4) 3. Use your Q1 function to write a function: def tableOfProductofEven Ints(even1, end_even): "Uses Q1 function as a helper function. prints a table of printProductEven Ints(evenl, even2) from end_even = even1 + 2 to end_even = end_even. Includes a table header - see sample run below."" ## Sample run: # tableOfProductOfEvenInts(2,12) # even1 even2 product 4 # 2 # 2 6 # 2 # 2 8 10 12 8 48 384 3840 46089 # 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
