From 3d8398670cb59f1e8d87f0810a1f610f634a93d9 Mon Sep 17 00:00:00 2001 From: HenryBass <63601449+HenryBass@users.noreply.github.com> Date: Sat, 3 Oct 2020 10:12:53 -0400 Subject: [PATCH] Changed it around a bit. --- bin/dice_simulator.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bin/dice_simulator.py b/bin/dice_simulator.py index eea578d..092d6b5 100644 --- a/bin/dice_simulator.py +++ b/bin/dice_simulator.py @@ -1,14 +1,14 @@ import random -def roll_dice(): +def roll_dice(range): while True: - dice_side = random.randrange(1, 7) - print("No on the top of dice rolled is ",dice_side) - yes_or_no=input("Do you want to continue y/n ") + dice_side = random.randrange(1, range) + print("You rolled: " + str(dice_side)) + yes_or_no=input("Do you want to continue? y/n ") if yes_or_no == 'n': - print("Over !") + print("Over!") break if __name__ == '__main__': - roll_dice() + roll_dice(7)