Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

in python, screen shot of work helps with indentations b. Next write a function

ID: 3725118 • Letter: I

Question

in python, screen shot of work helps with indentations

b. Next write a function quietCraps0 that simply returns 0 or 1 but does not display the results of the rolls. It should behave exactly the same way as craps0 but without printing any information. To do this, re-write the craps(0 function above so that it takes a parameter that indicates when it should Usersmaya/Documents/DePaul_Teaching/'17-18 WO/esc241 W2017Hws/assign9 heml 2018 Assignment 9- CSC 241.801 display information about the rolls. Then use that function when writing the quietCraps0 function. Note that the craps0 function should still remain callable with no parameters and in that circumstance should behave as described in the previous part. Note that any solution that duplicates code found in the craps(0 function won't earn full credit. The quietCraps0 function should simply make an appropriate call to craps0. The following shows several sample runs of the function à Python 3.62 Shell Ele Edit Shell Debug Qptions Window Help val quietCraps) >>> val >>> val-quietcraps () >>> val >>> quietcraps () >>> quietcraps() quietcraps 0 quietcraps () 0 Ln: 147 Cot 4

Explanation / Answer

import random
def quietCraps():
return random.randint(0,1);
#Test of program   
for x in range(5):
  
print(quietCraps())