Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions Lab9.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ def encoder(password):
return new_password

def decoder(password):
pass
temp_string = ""
for char in password:
char = int(char)-3
if char < 0:
char = char+10
char = str(char)
temp_string += char
return temp_string

if __name__ == "__main__":
password = None
Expand All @@ -27,4 +34,4 @@ def decoder(password):
elif option == 2:
print(f"The encoded password is {password}, and the original password is {decoder(password)}.")
elif option == 3:
break
break