我的“其他:”为我的代码提供了无效的语法

时间:2019-02-10 13:29:51

标签: python python-3.x

Python一直说我的代码的else:部分是无效的语法。

Start = str(input("Please type anything to start the game!"))
Confirm = str(input("Please type the same thing again to confirm you would like to start the game!"))
if Start == Confirm:
        Roll = str(input("Type Roll to roll the dice"))
        import random
DiceNumber = random.randint(1,6)
print ("You rolled a", DiceNumber)
else:
    print("Goodbye then!")

0 个答案:

没有答案