Dice Rolling Simulator Mini Project
#######################################################
from random import randint
def functionDice(x,y):
print("Here x is: ",x," Here y is: ",y)
if int(x) < 7:
while True:
if int(x) == int(y):
print("You Won")
break
elif int(x) != int(y):
x = input("Please enter int between 1 to 6: ")
functionDice(x,randint(1,2))
else:
print("Value is greater than 6")
while True:
x = input("Please enter int between 1 to 6: ")
y = randint(1,6)
print("Here y is: ",y," Here x is: ",x)
functionDice(x,y)
from random import randint
def functionDice(x,y):
print("Here x is: ",x," Here y is: ",y)
if int(x) < 7:
while True:
if int(x) == int(y):
print("You Won")
break
elif int(x) != int(y):
x = input("Please enter int between 1 to 6: ")
functionDice(x,randint(1,2))
else:
print("Value is greater than 6")
while True:
x = input("Please enter int between 1 to 6: ")
y = randint(1,6)
print("Here y is: ",y," Here x is: ",x)
functionDice(x,y)
Comments
Post a Comment