def computeValue(condition , gps , wifi , camera):
int(val1=0)
int(val2=0)
val1 = (condition + gps + wifi + camera)
val2 = (condition + gps + wifi + camera)
return val1
return val2
def main():
w=0;
x=0;
y=0;
z=0;
q=0;
r=0;
s=0;
t=0;
# it then has conditions to assign values to wxyzqrst, and then
val1 = computeValue(w+x+y+z)
val2 = computeValue(q+r+s+t)
main()
error: TypeError: computeValue() missing 3 required positional arguments: 'gps', 'wifi', and 'camera'與缺少必需的位置參數
任何援助有任何想法,以什麼即時做錯了什麼?
您是否嘗試傳遞4個參數? –
4個參數?哪裏?對不起,在這個 –
完成noob'w + x + y + z'是一個參數。你還需要3個。 –