csc-python-solutions/09/3 - 26 Letters.py

6 lines
116 B
Python
Raw Permalink Normal View History

2021-02-18 09:10:27 +00:00
letter = input()
if ord("A") <= ord(letter) <= ord("Z"):
print(ord(letter)-ord("A")+1)
else:
print("invalid")