반응형
When provided with a letter, return its position in the alphabet.
Input :: "a"
Ouput :: "Position of alphabet: 1"
Solution:
def position(alphabet):
return f"Position of alphabet: {ord(alphabet)-96}"
반응형
'나는 이렇게 학습한다 > Algorithm & SQL' 카테고리의 다른 글
1216. Define a card suit (0) | 2022.12.17 |
---|---|
1215. Is it even? (0) | 2022.12.15 |
1213. Exclamation marks series #1: Remove an exclamation mark from the end of string (0) | 2022.12.13 |
1212. String cleaning (0) | 2022.12.12 |
1211. Maximum Product (0) | 2022.12.11 |