Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Diceroller.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import random

lst=["1","2","3","4","5","6"]
while(True):
print("\nEnter 0 to roll the dice")
print("Enter 1 to stop the program")
choice=input()
if(choice=="0"):
roll=random.choice(lst)
print(f"\n{roll}")
elif(choice=="1"):
break
else:
print("Invalid Input")

print ("Program Terminated")