From 019dcd2aad498a717ea455bafcf699b5dd453cdb Mon Sep 17 00:00:00 2001 From: mayank_singhal Date: Sun, 20 Oct 2019 21:55:26 +0530 Subject: [PATCH] roll as many dice as you want --- roll_the_die.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 roll_the_die.py diff --git a/roll_the_die.py b/roll_the_die.py new file mode 100644 index 0000000..75ea7c7 --- /dev/null +++ b/roll_the_die.py @@ -0,0 +1,14 @@ +import random; +min_number = 1 +max_number = 6 + +throw = "yes" + +while throw == "yes" or throw == "y": + print("how many dices you want to throw") + a = int(input()) + print("lets see your outcomes") + for i in range(0,a): + outcome = random.randint(min_number,max_number) + print("the number on die",i,"is",outcome) + throw = input("do you want to throw again then press Y or press n") \ No newline at end of file