158k views
0 votes
It keeps saying telling me that this code:

c = 0

while (True):

user_input = input("Please enter the next word: " )

if user_input == "STOP":

break

c += 1

print ("# {}: You entered {}".format(c, user_input))


print("All done. {} words entered.". format(c))


has some spacing and spelling and also punctuation errors and I'm not really sure why?


Please let me know as soon as possible.

User Erikest
by
5.0k points

2 Answers

0 votes
It’s looks like it’s false but I’m not sure
User Lawtonfogle
by
4.8k points
0 votes

Answer:

your code looks correct. I think your issue is just indentation. with Python you want to be very careful with spacing.

Step-by-step explanation:

c = 0

while (True):

user_input = input("Please enter the next word: " )

if user_input == "STOP":

break

c += 1

print ("# {}: You entered {}".format(c, user_input))

print("All done. {} words entered.". format(c))

User Ben Amos
by
4.9k points