Python,can';t分配给函数调用。I';I’’我今天想把它修好,但没有成功

Python,can';t分配给函数调用。I';I’’我今天想把它修好,但没有成功,python,Python,Python向您显示有错误的行。很可能 def consequence_0 (): consequence_0 () = input ("Now you can see into darker places...") try: if consequence_0 == 'shiny object': print ("You picked up a key") elif consequence_0 == 'pick up shi

Python向您显示有错误的行。很可能

def consequence_0 ():
    consequence_0 () = input ("Now you can see into darker places...")
    try:
        if consequence_0 == 'shiny object':
            print ("You picked up a key")
        elif consequence_0 == 'pick up shiny object':
            print ("You picked up a key")
    except ValueError:
        print ("You can't carry out that action")
        print

def consequence_1 ():
    consequence_1 () = input ()
    try:
        if consequence_1 == 'open bible':
            print ("The bible opens and you see a single page attached to the inside of the cover")
        elif consequence_1 == 'open the bible':
            print ("The bible opens and you see a single page attached to the inside of the cover")
    except ValueError:
        print ("You can't carry out that action")
        print
这是一个函数调用,不能分配给函数调用。去掉牛仔的腿,你会有一个功能,提示黑暗的地方

consequence_0 () = input ("Now you can see into darker places...")

更改:
result\u 0()=输入(“现在您可以看到更暗的地方…”)

对此:
result\u 0=input(“现在你可以看到更暗的地方了…”)

还有这个
result\u 1()=input()
to
result\u 1=input()


在此代码中,您试图将
input
的结果分配给函数,但这不起作用。您想将其分配给一个变量。

您能发布堆栈跟踪吗。。。但是,
result\u 0()=input
是一个函数调用,您正在尝试分配给它。你想要实现什么?你认为
()
到底做了什么?你可能想找一个教程。命名建议:没有理由在局部变量所在的函数后命名,尤其是没有理由让用户键入的名称知道它在处理用户输入的第n个函数中。说出事物的名称。。。记住,
input
(一个名词和一个动词)已经被一个内置的。考虑一些类似于<代码> UsRyPosivs>代码>、<代码> PraseSsEngs>代码>,或者甚至只是<代码>动作< /代码>。这两个函数可以安全地为同一个角色使用相同的名称,因为不同的函数使用不同的名称空间。您定义的某些函数可能重复,您尝试做的第一件事是递归调用它们,然后尝试分配给结果?这完全没有道理。(1) 为变量选择一个新名称(2)分配给变量,而不尝试像函数一样调用它。例如,将
result\u 0()=…
更改为
my\u var=…
def consequence_0 ():
    consequence_0 = input ("Now you can see into darker places...")
    try:
        if consequence_0 == 'shiny object':
            print ("You picked up a key")
        elif consequence_0 == 'pick up shiny object':
            print ("You picked up a key")
    except ValueError:
        print ("You can't carry out that action")
        print