Create 4 - Next Letter.py
This commit is contained in:
parent
24ac7d28ab
commit
9ce9ac3e31
7
07/a/4 - Next Letter.py
Normal file
7
07/a/4 - Next Letter.py
Normal file
@ -0,0 +1,7 @@
|
||||
char = input()
|
||||
if ord(char) == ord("Z"):
|
||||
print("A")
|
||||
else:
|
||||
print(chr(ord(char) + 1))
|
||||
# without if:
|
||||
# print(chr((ord(input()) - ord("A") + 1) % 26 + ord("A")))
|
Loading…
Reference in New Issue
Block a user