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

Why were the roman and chinese empires able to enjoy long periods of relative stability and prosperity?
Arshad's father bought x sweets, (44 - x) were eaten by the children and 20 were left. How many sweets did his father bring?
Is the attainment of organizational goals in an effective and efficient manner through planning, organizing, leading, and controlling organizational r?
shagufta has a part-time job she is paid £5.60. last week shagufta worked for 24 hours. work out shagufta's total pay for last week.
Find the y-intercept for the graph of the quadratic function. y + 4 = (x + 2)
Read the dialog and fill in the blank with the appropriate question or statement: Caroline: Bonjour Fred. Frédéric: Salut Caroline. Caroline: Voilà Sophie.
I NEED THIS ANSWERED FAST!!! Which of the following is an example of direct use?
lead the “ New Side” after the Presbyterian church split
Combine Like Terms: 2x - 8 + 14x + 6 - 14
I need help with this algebra thing as well, because I literally do not understand it (this is a geometry class)