EBGR 6 HW 9-21-2017
Dice
* I first allow user to input how many time they want to roll the dice, which determine how many print that show on screen. Next, I used for loop with random number between 0 to 6, which stimulate the chances of getting numbers. Then, print both number and sum of both number to see how many times it appears in the process. Lastly, print out number of 8 appear in the process.** Problem: I dont know how to make it from 1 to 6?
* So I rolled the dice 20 times, which print out this wonderful result. At the last line, it show how many 8 appear in the process.
* Use the given equation and input it into the program, however, the answer is a little less than actual answer.
Comments
Post a Comment