Here are my instructions:
We will pass you a value, N. You should output every positive value from N down to and including 0.
And here is my assignment:
# Get N from the command line
import sys
N = int(sys.argv[1])
# Your code goes here
counter = 0
while counter <= N:
print(counter-N)
counter = counter + 1
My solution prints this:
Program Output
Program Failed for Input: 3
Expected Output: 3
2
1
0
Your Program Output: -3
-2
-1
0
As you can see, I got the output to show -3, -2, -1, 0, but it should be 3, 2, 1, 0. Please be mindful that I am a beginner, and my code must pass using a 'while' statement, and my code must be inputted in Codio. Thank you in advance for any assistance rendered.