Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions bin/dice_simulator.py
Original file line number Diff line number Diff line change
@@ -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)