I wrote the following code and get the error message: TypeError: checkio() takes 1 positional argument but 3 were given
def checkio(given_tuple):
if len(given_tuple) < 2:
return 0
else:
return float("{0:.3f}".format(max(given_tuple))) - float("{0:.3f}".format(min(given_tuple)))
print(checkio(1,2,3))
Why is the tuple (1,2,3) treated as 3 arguments instead of one, and how can I fix this?
Thank you for the help in advance!
Created at: 2019/11/09 10:02; Updated at: 2019/11/10 06:55