asked 142k views
8 votes
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.

asked
User Sanman
by
8.1k points

1 Answer

2 votes

import random

for x in range(100):

print(random.randint(1,6))

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

answered
User Ankur Loriya
by
8.0k points
Welcome to Qamnty — a place to ask, share, and grow together. Join our community and get real answers from real people.