From fe5f013107b596e6875c1b36568a11fbaa71e507 Mon Sep 17 00:00:00 2001 From: Jesse O'Connor Date: Sun, 5 Aug 2018 23:25:38 +1000 Subject: [PATCH] Better yet, explicitly loop through number of dice we need --- Diceroll.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Diceroll.py b/Diceroll.py index 5dfcec8..50780c5 100644 --- a/Diceroll.py +++ b/Diceroll.py @@ -15,10 +15,7 @@ print ("You rolled...") count = 0 #while loop repeats roll for how many dice are set - while True: + for x in range(DICE): print (random.randint(MIN, MAX)) - count += 1 - if count >= DICE: - break #ask user if they want to roll again ROLLAGAIN = input("Roll again?").lower()