diff --git a/ciphers/hill_cipher.py b/ciphers/hill_cipher.py index 19422688c..c690d29bd 100644 --- a/ciphers/hill_cipher.py +++ b/ciphers/hill_cipher.py @@ -78,8 +78,10 @@ class HillCipher: '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: """