sarathi_1234's blog

By sarathi_1234, history, 4 years ago, In English

Guys Anyone can suggest me why I got "wrong answer on test case 3 or 1" in fact my code produces the right output. Example:-

Caps Lock problem

n=input() p=n.capitalize() if n==n.upper(): print(n) else: print(p)

  • Vote: I like it
  • +3
  • Vote: I do not like it

| Write comment?
»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

You should not change the string if there's a letter except the first one is not Capitalized.