raw_input_wrapper()接受从0到1的位置参数,但为2提供了Python 3.5

raw_input_wrapper()接受从0到1的位置参数,但为2提供了Python 3.5,python,Python,我正在尝试制作一个基于文本的冒险游戏,我得到了一个错误:“0到1个位置参数,但给出了2个。”我不知道这意味着什么,也不知道如何修复它。谁能给我解释一下这个问题吗?谢谢大家! ########################################################## ##farm game ########################################################## player_name = input("What's yo

我正在尝试制作一个基于文本的冒险游戏,我得到了一个错误:“0到1个位置参数,但给出了2个。”我不知道这意味着什么,也不知道如何修复它。谁能给我解释一下这个问题吗?谢谢大家!

##########################################################
##farm game
##########################################################


player_name =  input("What's your name? ")
print ("Hello {}".format(player_name))

print ("You wake up to the sound of your mother calling from the kitchen: 
       {}" .format(player_name), ", wake up!  I need your help in the kitchen!")
ch1 = str(input("Will you go downstairs? "))

# kitchen
if ch1 in ['y', 'Y', 'Yes', 'YES', 'yes']:
    print("You go downstairs.")
    ch2 = str(input("Your mother is in front of the oven, preparing to make 
                 a loaf of bread.  She turns to look at you and says: {}" 
                .format(player_name), ", I need three eggs.  Please go fetch 
                 the eggs from the barn."))
if ch2 in ['y', 'Y', 'Yes', 'YES', 'yes']:
    print("You leave the kitchen and enter the large back yard.  You are in 
       a fenced in area.  Three pigs are rooting around in the fresh spring 
       grass, snorting and snuffling.  At the end of the yard is the barn, 
       where the cows and horses live.  To your right is the kitchen coop.  
       You can hear the soft clucking of chickens from inside.")

# no kitchen
else:
    print("You look around the room.")

您在
input()
中传递的参数太多。请参见以下示例:

>>> x = input()
hello world
>>> print(x)
hello world


>>> x = input("Say hello: ")
Say hello: hello world
>>> print(x)
hello world


>>> x = input("first argument", "second argument")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: input expected at most 1 arguments, got 2

我的if和print语句是缩进的,但我没有像这里那样复制粘贴它。所以我不认为这是一个语法问题。我为你清理了格式。这解决了问题!非常感谢。
ch2 = input("Your mother is in front of the oven, preparing to make a loaf of bread.  She turns to look at you and says: {} , I need three eggs. Please go fetch the eggs from the barn.".format(player_name)))