MCPcopy Create free account
hub / github.com/geekcomputers/Python / encode

Function encode

Caesar Cipher Encoder & Decoder.py:40–49  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38
39
40def 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
52def decode():

Callers 1

mainFunction · 0.85

Calls 1

get_intFunction · 0.85

Tested by

no test coverage detected