mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 17:34:49 +08:00
Set the Python file maximum line length to 88 characters (#2122)
* flake8 --max-line-length=88 * fixup! Format Python code with psf/black push Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@ -55,7 +55,8 @@ def check_keys(keyA, keyB, mode):
|
||||
|
||||
def encrypt_message(key: int, message: str) -> str:
|
||||
"""
|
||||
>>> encrypt_message(4545, 'The affine cipher is a type of monoalphabetic substitution cipher.')
|
||||
>>> encrypt_message(4545, 'The affine cipher is a type of monoalphabetic '
|
||||
... 'substitution cipher.')
|
||||
'VL}p MM{I}p~{HL}Gp{vp pFsH}pxMpyxIx JHL O}F{~pvuOvF{FuF{xIp~{HL}Gi'
|
||||
"""
|
||||
keyA, keyB = divmod(key, len(SYMBOLS))
|
||||
@ -72,7 +73,8 @@ def encrypt_message(key: int, message: str) -> str:
|
||||
|
||||
def decrypt_message(key: int, message: str) -> str:
|
||||
"""
|
||||
>>> decrypt_message(4545, 'VL}p MM{I}p~{HL}Gp{vp pFsH}pxMpyxIx JHL O}F{~pvuOvF{FuF{xIp~{HL}Gi')
|
||||
>>> decrypt_message(4545, 'VL}p MM{I}p~{HL}Gp{vp pFsH}pxMpyxIx JHL O}F{~pvuOvF{FuF'
|
||||
... '{xIp~{HL}Gi')
|
||||
'The affine cipher is a type of monoalphabetic substitution cipher.'
|
||||
"""
|
||||
keyA, keyB = divmod(key, len(SYMBOLS))
|
||||
|
Reference in New Issue
Block a user