Python 每当我加载.py时,它都会立即关闭

Python 每当我加载.py时,它都会立即关闭,python,Python,我是Python新手,我正在创建一个多路径游戏,但只要我在.py中打开它,它就会立即关闭!因此,如果有人能在这里帮助我,我将不胜感激 这是我的密码: def Roadto1stWin(): print("You have just joined the world of CounterStrike") print("3 Hours later") print("You have now got to rank 2 so you can finally play comp") print("You

我是Python新手,我正在创建一个多路径游戏,但只要我在.py中打开它,它就会立即关闭!因此,如果有人能在这里帮助我,我将不胜感激

这是我的密码:

def Roadto1stWin():
print("You have just joined the world of CounterStrike")
print("3 Hours later")
print("You have now got to rank 2 so you can finally play comp")
print("You find yourself playing a game of Comp on the map mirage")
print("Now that you have got to pistol round where do you go?")
print("Mid? B? or A?")
a = input("Type mid, b or a then hit 'Enter'.").lower()
if a ==("mid"):
   print("Okay nice you are going Mid")
   print("Where should you watch from?")
   print("Connector? Short? or Window?")
   b = input("Type connector, short or window Then hit 'Enter'.").lower()
   if b ==("connector"):
      print ("They rush B and kill the rest of your team and you lose the round")
      print ("Now your team are questioning your mid ability!")
      print ("Do you fight back and try to win the argument? or do you just carry on playing")
      c = input ("Type fight or play then hit 'Enter'.").lower()
      if c ==("fight"):
         print ("Your TeamMates end up not liking you and kick you")
      elif c ==("play"):
         print ("Another one of your teammates goes mid instead of you!")
         print ("You have decided to go B since there is only 1 at b")
         print ("Now your Teammate dies instantly at mid")
         print ("The enemy team win this round as well")
         print ("Now do you complain or play")
         d = input ("Type complain or play then hit 'Enter'.").lower()
         if d == ("play"):
            print ("Your team are mad at you for no voting to kick him so you get kicked")
            print ("The End")
         elif d == ("complain"):
              print ("Nice your team stand up with you and you kick the player")
              print ("Now that the player is gone your team have good chemistry")
              print ("You end up winning the game well done!")
        if b == ("short"):
           print ("You die instantly and since your team are full of Russians you get kicked")
           print ("The End")
        if b == ("window"):
           print ("You kill 3 of the enemies rushing mid and your teammates praise you!")
           print ("Now a second teammate has pushed short killing the player you were gonna kill!")
           print ("What do you do?")
           print ("argue at him or leave it alone")
           e = input ("Type argue or leave it then hit 'Enter'.").lower()
           if e == ("argue"):
              print ("Your team are toxic and don't like your attitude so they kick you")
              print ("The end")
           elif e == ("leave it"):
              print ("You get on well with each other and win the game")
路到斯特温()

这是密码!
感谢您的回复

Treguna Mekoides Trecorum Satis Dee?好的,谢谢!也许你有语法错误。我会在我的机器上运行你的代码,但我无法将图像复制粘贴到记事本中。(提示,提示)截图、裁剪和上传不比复制和粘贴文本需要更多的努力吗?无论如何,在屏幕截图中阅读和尝试代码肯定比较困难-请用文本替换屏幕截图。我在这里看到很多混合的选项卡和空格。这些会给你带来很多奇怪的虫子,可能包括这个。坚持一种压痕;建议使用空间。