diff --git a/ciphers/hill_cipher.py b/ciphers/hill_cipher.py index 19422688cd70..c690d29bd113 100644 --- a/ciphers/hill_cipher.py +++ b/ciphers/hill_cipher.py @@ -78,8 +78,10 @@ def replace_digits(self, num: int) -> str: 'T' >>> hill_cipher.replace_digits(26) '0' + >>> hill_cipher.replace_digits(26.1) + '0' """ - return self.key_string[(num)] + return self.key_string[int(num)] def check_determinant(self) -> None: """