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

is anyone willing to help me with a analysis
Why is it so difficult to obtain pure water
5. A good way to spend a mini-vacation is to A. do as much as possible in the time you have. B. try an activity you're interested in learning.
who was the first european to reach north america since the viking expeditions
What part of a neuron conducts electrical signals away from the cell body?
Which of following represents 32/100? Thirty-two hundredths 0.032 0.23 Thirty-two tenths
Java allows you to declare methods with the same name in a class. this is called
Which of the following statements applies to the Apple Macintosh computer
Kassandra had a gross income of $3008.33 during each pay period in 2009. If she got paid monthly, how much of her pay was deducted for FICA in 2009?
Give the name of HCl as an acid and as a binary compound. Spelling counts!