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 quotation from "First Love" by Judith Ortiz Cofer best refines the theme that love can be complicated? “It would be long weeks of confusion and pain
Which definition below describes stream of consciousness? a. A succession of ideas and images constantly moving forward in time but in a random pattern, represe
Which of the following exponential functions goes through the points (1, 20) and (2, 80)? f(x) = 5(4)−x f(x) = 4(5)−x f(x) = 5(4)x f(x) = 4(5)x
Which word does the participial phrase modify? Is that a sketch of the dress designed for the performance? A. designed B. dress C. sketch D. performance
Quel est le conditionnel de: regarder (je) je regardrais je regarderai je regardai je regarderais Quel est le conditionnel de: pouvoir (tu) tu peux tu pou
find the sum of (x+5) + (-4x-2) + (2x-1) =
Is 776 x 6= 77 X 6 x 100 false?
combining like terms simplify each expression -v + 12v
Simplify cube root of 5 over fourth root of 5.
What is the probability of finishing a project on or before 22 weeks if the mean (expected) total duration is 18 weeks and the variance is 4 weeks?