()
| 38 | |
| 39 | |
| 40 | def encode(): |
| 41 | encoded_cipher = "" |
| 42 | text = input("Enter text to encode: ") |
| 43 | key = get_int() |
| 44 | |
| 45 | for char in text: |
| 46 | ascii = ord(char) + key |
| 47 | encoded_cipher += chr(ascii) |
| 48 | |
| 49 | print(f"Encoded text: {encoded_cipher}") |
| 50 | |
| 51 | |
| 52 | def decode(): |