diff --git a/Lab9.py b/Lab9.py index b54a4b4..c71d808 100644 --- a/Lab9.py +++ b/Lab9.py @@ -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 @@ -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 \ No newline at end of file + break