brostace brostace
  • 12-01-2021
  • Computers and Technology
contestada

Use the function random.randint to write a program that rolls a 6-sided die 100 times, and prints out all of the rolls.

Print each roll on its own line.

Respuesta :

Cytokine
Cytokine Cytokine
  • 12-01-2021

import random

for x in range(100):

   print(random.randint(1,6))

I wrote my code in python 3.8. I hope this helps.

Answer Link

Otras preguntas

Which substance has the highest density at room temperature? A.) Hydrogen B.) Oxygen C.) Water D.) They are all the same
1. The Louisiana Territory was purchased in 1803 from _____. A.) Britain B.) France C.) Spain D.) Louisiana 2. Who forced Napoleon Bonaparte to aband
Choose the correct words to complete the sentence. One possible reason that the Revolutionary-era poets used _______ the meter was to imitate the _______ style
The more root hairs a plant has, the more water and nutrients it can absorb. What is an appropriate justification of this statement?
How many bonds do atoms with 5 valence electrons form?
Urea is commonly used in laboratories. What will be the effect of adding a concentrated urea solution to a protein? a. denaturation of protein b. no effect c.
A workers success in contributing to the common good is ______.
example of a number thats not rational and tell me why its not
A circle is defined by the equation: x^2 + y^2 – x – 2y – 11/4 = 0. Determine the coordinates for the center of the circle and the length of the radius.
If ab is the base of isosceles triangle ABC, then which of the following is the vertex angle?