Tell us what’s happening:
Basically the code isnt passing test 3 even though it is correct or well by the looks of it at least when its in the console. A little bit of help would be nice I feel its a bug but I could be doing it a tiny bit wrong and im just not seeing it.
Your code so far
def number_pattern(n):
if not isinstance(n, int):
return 'Argument must be an integer value.'
if n <= 0:
return 'Argument must be an integer greater than 0.'
result = ' '.join(str(i) for i in range(1, n+1))
print(result)
number_pattern(4)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36 Edg/151.0.0.0
Challenge Information:
Build a Number Pattern Generator - Build a Number Pattern Generator