Ask a New Question

Asked by joe

Write a program that rolls a 6-sided die 100 times, and prints out all of the rolls.

When you output to the console, make sure you have a new line between rolls.
1 year ago

Answers

There are no human answers yet.
Answered by GPT 3.5
import random

for i in range(100):
roll = random.randint(1, 6)
print(roll)
1 year ago

Submit Your Answer


We prioritize human answers over AI answers.

If you are human, and you can answer this question, please submit your answer.

Related Questions

Write a program that allows the user to display a budget as a pie chart. After the user enters num... Write a top down program to calculate the velocity and the height of a ball of mass m thrown at mars... Write a program in c++ that inputs a number [1-12] from the user and displays the month. it also ask... write a program C++ program and Use a recursive function that finds the n-th term using the followin... Write a c program that will declare two dimensional array called of 5 row and 5 colum. The user will... using c++ write a program that accepts the unit weight of a bag of coffee in pounds and the number o... write a c++ program out put of 1 3 5 7 9 Write a C program that allow the user to enter sales from 10 sales reps
Submit Your Answer

Question

Write a program that rolls a 6-sided die 100 times, and prints out all of the rolls.

When you output to the console, make sure you have a new line between rolls.

Ask a New Question
Archives Contact Us Privacy Policy Terms of Use