subject

Write a function called dicerolls() that takes as input a possible result r of a roll of a pair of dice (i. e., an integer between 2 and 12) and an integer n. the function simulates repeated rolls of a pair of dice until n rolls of r have been obtained. your function should print how many rolls it took to obtain n rolls of r.
> > > dicerolls(7, 50)
it took 319 rolls to get 50 rolls of 7
> > > dicerolls(5, 150)
it took 1265 rolls to get 150 rolls of 5
> > > dicerolls(11, 100)
it took 1971 rolls to get 100 rolls of 11

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 17:00
In which of the following ways can using test-taking tips you? a. you can focus on the information that you need to study. b. you will see the answers to the test. c. you will study more. d. you will be less organized.
Answers: 1
question
Computers and Technology, 24.06.2019 15:00
Universal windows platform is designed for which windows 10 version?
Answers: 1
question
Computers and Technology, 24.06.2019 19:00
Which of the following "invisible" marks represents an inserted tab?
Answers: 1
question
Computers and Technology, 24.06.2019 21:30
What need most led to the creation of the advanced research projects agency network? darpa wanted scientists to be able to collaborate and share research easily. darpa wanted american and russian politicians to be able to communicate. darpa wanted astronauts to be able to contact nasa and the white house. darpa wanted factory owners to be able to coordinate supply chains.
Answers: 1
You know the right answer?
Write a function called dicerolls() that takes as input a possible result r of a roll of a pair of d...
Questions
question
Mathematics, 10.09.2021 07:10
question
Spanish, 10.09.2021 07:10
question
Mathematics, 10.09.2021 07:10
Questions on the website: 13722367