mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
fix: function name typo (#11319)
* fix: function name typo Signed-off-by: guoguangwu <guoguangwug@gmail.com> * lfu_cache.py: Use f-strings * rsa_cipher.py: Use f-strings --------- Signed-off-by: guoguangwu <guoguangwug@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
This commit is contained in:
parent
fd27953d44
commit
5f95d6f805
|
@ -102,8 +102,7 @@ def read_from_file_and_decrypt(message_filename: str, key_filename: str) -> str:
|
||||||
sys.exit(
|
sys.exit(
|
||||||
f"ERROR: Block size is {block_size * 8} bits and key size is {key_size} "
|
f"ERROR: Block size is {block_size * 8} bits and key size is {key_size} "
|
||||||
"bits. The RSA cipher requires the block size to be equal to or greater "
|
"bits. The RSA cipher requires the block size to be equal to or greater "
|
||||||
"than the key size. Did you specify the correct key file and encrypted "
|
"than the key size. Were the correct key file and encrypted file specified?"
|
||||||
"file?"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
encrypted_blocks = []
|
encrypted_blocks = []
|
||||||
|
|
|
@ -57,7 +57,7 @@ class Gridworld:
|
||||||
def show(self):
|
def show(self):
|
||||||
print(self.w)
|
print(self.w)
|
||||||
|
|
||||||
def get_neigbours(self, cell):
|
def get_neighbours(self, cell):
|
||||||
"""
|
"""
|
||||||
Return the neighbours of cell
|
Return the neighbours of cell
|
||||||
"""
|
"""
|
||||||
|
@ -110,7 +110,7 @@ def astar(world, start, goal):
|
||||||
_closed.append(_open.pop(min_f))
|
_closed.append(_open.pop(min_f))
|
||||||
if current == goal:
|
if current == goal:
|
||||||
break
|
break
|
||||||
for n in world.get_neigbours(current):
|
for n in world.get_neighbours(current):
|
||||||
for c in _closed:
|
for c in _closed:
|
||||||
if c == n:
|
if c == n:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue
Block a user