“Function ________ at 0x01D57aF0” return in python

后端 未结 2 1144
不知归路
不知归路 2020-12-12 08:05

I just started using python a week ago although I have some background in C++. I\'m just making some simple user defined functions. Code is below.

def quad         


        
2条回答
  •  南方客
    南方客 (楼主)
    2020-12-12 08:38

    Like David Robinson said in his comment, I think the function will run correctly if you enter

    quadratic.quads()
    

    This runs it as a function, as all functions have the two parentheses. Without it, it would be considered a variable in a class.

提交回复
热议问题