diff --git a/Diceroller.py b/Diceroller.py new file mode 100644 index 0000000..c6b390d --- /dev/null +++ b/Diceroller.py @@ -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")