asked 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.

asked
User Erikest
by
7.6k points

2 Answers

0 votes
It’s looks like it’s false but I’m not sure
answered
User Lawtonfogle
by
7.5k 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))

answered
User Ben Amos
by
7.9k points