#4: Implementing Multiplikative Chiffre
This commit is contained in:
1 parent
c6a72d32e4
commit
588507bcf5
3 files changed
+66
-6
No files matched your search
@@ -8,14 +8,9 @@ def get_letter_at_index(idx: int, capital: bool = False):
|
||||
|
||||
return LETTERS[idx] if capital else LETTERS[idx].lower()
|
||||
|
||||
|
||||
def get_index_of_letter(letter: str):
|
||||
if letter.upper() not in LETTERS:
|
||||
raise AttributeError
|
||||
|
||||
return LETTERS.index(letter.upper())
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print(get_letter_at_index(25, True))
|
||||
print(get_index_of_letter('ä'))
|
||||
|
||||
Reference in new issue
Block a user