Am I missing something here? I've changed the range from 10 to 20 so it prints up to 19. Not sure what's wrong with this. Help, please!
Have you tried resetting the code? If that doesn't work maybe try a different browser.
According to this the error you get would be expected if you had bound an int to range like so:
range = 12
but you obviously didn't. Seems to be a bug.
Yeah, I reset it multiple times. I'll try another browser. Thanks!
Hi! You are using
Use it like so:
range(start, stop[, step])
Rather than being a function, range is actually an immutable
sequence type, as documented in Ranges and Sequence Types — list, tuple, range.
Link: Use of range()
In the website you linked it says:
range(stop) range(start, stop[, step])
The first way to use range seems to be the exact way it was used by chickenmonkey_7.
Awww sorry, I just use my code like this. But I'm glad it worked for you!
No worries. Thanks for tryna help.