a = input("enter the message")a = list(a)b = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m","n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z",",", ".", "?", "!", "@", "#", "$", "%", "^", "&", "*","0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]d = {}for i in a: c = 0 for j in b: if i == j: d[j] = c # Use dictionary assignment instead of update c = c + 1print(d)e = ""for i in d.keys(): print(i) if i % 2 == 0: c = int(i / 2) f = 0 for j in b: if c == f: e = e + j else: c = int((i - 1) / 2) f = 0 for j in b: if c == f: e = e + jprint(e)
I don't know how to fix it. I am new to the programming and i don't have much idea.please help me how to fix it.I know that in dictionary keys are integer but still it give the error.it give TypeError: not all arguments converted during string formatting