My code does not qualify for 3 to 7, but it does everything that is required for those steps.
When inputting 4 → 1 2 3 4
0 → Argument must be an integer greater than 0.
“three” → Argument must be an integer value.
12 → 1 2 3 4 5 6 7 8 9 10 11 12
Your code so far
def number_pattern(n):
if not isinstance(n, int):
message = print("Argument must be an integer value.")
return message
elif not n > 0:
message = print("Argument must be an integer greater than 0.")
return message
else:
number_list = print(*range(1, n + 1))
return number_list
number_pattern(0)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36
Challenge Information:
Build a Number Pattern Generator - Build a Number Pattern Generator
no, they are both calling the function, but one is just the function call, while the other has the function call inside a print, which means it is printing the function output
you need to check the function output, most of the time that is what the tests are testing