def Round1():
ESC1 = str(random.randint(0,6))
ESC2 = str(random.randint(0,6))
ESC3 = ESC1 + ESC2
Dice = input("Player 1's turn. Do you want to roll your 2 dice? (Y for yes and N for no) ")
if Dice == "Y" or "y":
print("Player 1 rolled their 2 dice. They rolled a " + ESC1 + " and a " + ESC2)
if int(ESC3) % 2 == 0:
print("Player 1 got " + (ESC3 + 10) + "points")
elif Dice == "N" or "n":
sys.exit()
ESC4 = str(random.randint(0,6))
ESC5 = str(random.randint(0,6))
ESC6 = ESC1 + ESC2
Dice1 = input("Player 2's turn. Do you want to roll your 2 dice? (Y for yes and N for no) ")
if Dice1 == "Y" or "y":
print("Player 2 rolled their 2 dice. They rolled a " + ESC4 + " and a " + ESC5)
if int(ESC6) % 2 == 0:
print("Player 2 got " + (ESC6 + 10) + "points")
elif Dice1 == "N" or "n":
sys.exit()
while ESC6 > ESC3: #need help here
print("Player 2 won round 1.")
if ESC3 > ESC6:
print("Player 1 won round 1")
我需要代码底部的“ while”部分的帮助,因为当我运行该函数时它似乎没有运行,但其余部分运行良好。