In the final part of the Functions lesson the instructions tell me that I can use any argument in the function being defined. Because the code seemed to be about identifying the type of the argument, I put in the integer of “-138”. After several error messages, I gave up and looked at the code. This is what was revealed:
if type(num) == int or type(num) == float:
This code completes the final part (19/19) of the Functions lesson. I replaced the argument “num” with what I had initially tried (-138, and additionally 138, 123 and some others) and this is the error I got:
File “python”, line 1
SyntaxError: invalid syntax
I believe there is a possibility that I’m not quite clear on what an “argument” is, in this case, and then also how that differs from a “parameter”. Is there any reason why the code works with “num” and not some other argument, say, “…any argument [I] like”?