From 2696f08acf556f76a69ab1065fed11ae7bfb6484 Mon Sep 17 00:00:00 2001 From: Shubham-Khetan-2005 <67836904+Shubham-Khetan-2005@users.noreply.github.com> Date: Thu, 1 Oct 2020 00:48:00 +0530 Subject: [PATCH] Add files via upload --- Diceroller.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Diceroller.py 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")