Jan-21-2017, 02:15 PM
Please Help me what's the prob with str and int
If someone can explain this problem
They said me : TypeError: Can't convert 'int' object to str implicitly
CODE : Test the code in this super dupper website : http://www.pythontutor.com/visualize.html#mode=display
If someone can explain this problem

They said me : TypeError: Can't convert 'int' object to str implicitly
CODE : Test the code in this super dupper website : http://www.pythontutor.com/visualize.html#mode=display
Msg ="MATHS" def num (caractere): return ord (caractere)-65 def lettre (n): return chr (n+65) for c in Msg : print (c,end="|") print() for c in Msg : print(num(c), end=" | ") print ('\n\n', 'le message est sous forme de chiffres') for c in Msg: print ( '\n\n','Maintenant veuillez entrer deux chiffres pour créer votre cles ') # Finir Cle print ('\n\n', 'soit la fonction affine a*x + b qui va vous permettre de créer votre cles ') A = 11 B = 7 for c in Msg: r=chr((A*(ord(c)-65)+ B)%26 + 65) print(lettre(r), end=" | " )