TypeError Too many Arguments

后端 未结 4 1850
自闭症患者
自闭症患者 2021-01-23 03:29

When running this code it appears with an error that there are too many arguments in line 8. I\'m unsure on how to fix it.

#Defining a function to raise the firs         


        
4条回答
  •  -上瘾入骨i
    2021-01-23 04:13

    you need to specify x variable :

    using format

    y = int(input("What power would you like to raise {}to?\n".format(x)))
    

    or

    y = int(input("What power would you like to raise %d to?\n"%x)))
    

提交回复
热议问题