5/19 Count does not equal 1/0?


#1

Every time I attempt to complete this problem I get one of two error messages:

-It looks like your while loop does not print 0. Did you increment count correctly?
-It looks like your while loop does not print 1. Did you increment count correctly?

My code is:

while count < 1:
print count
count = count + 1

Whenever I adjust the code so that it prints the correct number (by switching where the count +=1 statement is) I get the opposite error message. I haven't a clue what I'm doing wrong because my code looks really similar to the example to this problem :confused:

Edit:

After having the program adjusted so that they both print (count <= 1) it not tells me that there's an error because the code doesn't print "2". I feel like I'm just facing more issues the more progress I make.


#2

Try using

count = 0

while count < 10: # Add a colon
    print count
    # Increment count
    count += 1

#3

Oops! Thanks! Looks like I somehow deleted the zero in "count < 10". Looks like I was getting frustrated over a simple fix