|
|
back to boardAC! Python 3.3 from sys import stdin from sys import stdout upper = True while (True): char = stdin.read(1) if (not char): break; elif (65 <= ord(char) <= 90): if (upper): upper = False stdout.write(char) else: stdout.write(char.lower()) else: stdout.write(char) if (char == "." or char == "!" or char == "?"): upper = True Re: AC! Python 3.3 Brackets are unnecessary after while/if. Re: AC! Python 3.3 Posted by ura 5 Jul 2019 19:37 Edited by author 05.07.2019 19:38 Re: AC! Python 3.3 Posted by ura 5 Jul 2019 19:39 Great program! |
|
|