Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Mrinank-Bhowmick/python-beginner-projects
/ mod
Function
mod
projects/hill_cipher/decryption.py:9–14 ·
view source on GitHub ↗
(num)
Source
from the content-addressed store, hash-verified
7
8
# to perform the modulus operation
9
def
mod(num):
10
if
num < 0:
11
result = 26 - (abs(num) % 26)
12
else
:
13
result = num % 26
14
return
result
15
16
17
def
hill_cipher(text, key_matrix):
Callers
1
message
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected