Before iam start this, Did you already know what is Python? if not click this url below Click Here


Okay back to the topic, iam in here want to share what i make 1 weeks ago. well in fact, the logic was easy to thinking. How can be easy ? well see this

Iam gonna Encrypt word “a” which mean its 97 in ASCII Code. How i can get “a” is 97 in ASCII Code. On python, there is function to convert a specific word to ASCII Code called

# Python 3.7
ord("a")

After that, i need to check it is Even or Odd by call this function

# e = Even
# o = Odd
def _Check(num):
	if (num % 2) == 0: return "e"
	else: return "o"

(Encrypt) : If even ASCII Code will be devided 2, but if odd ASCII Code will incerement by 1.

(Decrypt) : If even ASCII Code will be multiplied 2, but if odd ASCII Code will decrement by 1.

def Encrypt(Character, Fix):
	res = ""
	for i in range(len(Character)):
		isDone = False
		chr = ord(Character[i])
		r = ""
		while True:
			if chr == 1: break
			t = chr
			if (_Check(t)) == "e":
				r += ev
				chr = chr / 2
			elif (_Check(t)) == "o":
				r += od
				chr = chr + 1
		if Fix == True: res += r + "\\n"
		else: res += r + "\n"
	return res
def Decrypt(Encrypted, Fix):
	res = ""
	max = len(Encrypted.split('\n')) - 1
	enc = Encrypted.split('\n')
	if Fix == True: 
		max = len(Encrypted.split("\\n")) - 1
		enc = Encrypted.split("\\n")
	for i in range(max):
		co = enc[i]
		nm = 1
		for a in range(len(co)):
			if co[(len(co) - 1) - a] == ev:
				nm = nm * 2
			elif co[(len(co) - 1) - a] == od:
				nm = nm - 1
		res += chr(nm)
	return res

Okay only here iam explain. if you interested to try it, Download it on this link below. The full code is in Download here