Блог пользователя sarathi_1234

Автор sarathi_1234, история, 6 лет назад, По-английски

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)

  • Проголосовать: нравится
  • +3
  • Проголосовать: не нравится

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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