TypeError: create_purple() takes 0 positional arguments but 2 were given

前端 未结 1 1560
没有蜡笔的小新
没有蜡笔的小新 2020-12-10 23:33

I am brand new to Python programming and trying to make this program work.

I have made this program work by using \"if\" and \"else\" statements only, however, I wa

相关标签:
1条回答
  • 2020-12-11 00:09

    You are calling create_purple with 2 arguments, yet your definition (def) has 0 arguments.

    Simply update the definition:

    def create_purple(color1,color2):
    
    0 讨论(0)
提交回复
热议问题