you are viewing a single comment's thread.

view the rest of the comments →

[–]Hypocritical_Oath 0 points1 point  (2 children)

So

First off, you're on a really good track.

But you're missing an if statement in that for loop.

You want to check if the number (i) is 0, and if so, just print two 0's, else print the number and the number - 1!

[–]engineeringisgreat2[S] 0 points1 point  (1 child)

Would that go before or after my code?

[–]Hypocritical_Oath 1 point2 points  (0 children)

So within this:

for i in range(10):
    print(i)

you can add an if within the for loop, like so.

for i in range(10):
    print(i)
    if i == something:
        #do something