Ask coding questions

← Back to all posts
What goes wrong?

There is a bug on line 23, I have no idea what goes wrong.

Coder100 (18101)

The code is a bit inefficient. You could have just done:

  if string[i].upper() == string[i]:
    # had to be uppercase
    # had to be lowercase
JBloves27 (1882)

It seems like your program is working just fine!

Kartang (0)

you are missing a bracket at the end of line 22 and 24 that will fix the problem