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.

Respuesta :

Answer:

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

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))

It’s looks like it’s false but I’m not sure