In: Computer Science
1. Write a program which simulates rolling dice. It should: Display the random number rolled Ask the user if they want to roll again. If they don't want to roll again, the program should end. If they do want to roll again, the new number should display. At a minimum, the die should have 6 sides, but if you want to use a d12 or d20, that is fine too.
USE PYTHON
import random
# Using randrange() to generate numbers from 1-6
ch="y"
while(ch=="y"):
n=random.randrange(6)+1
print(n)
ch=input("do you want roll again (y/n)?")
Note : Please comment below if you have concerns. I am here to help you
If you like my answer please rate and help me it is very Imp for me