((Please don't delet this post Delet the others))
Sorry for the spam :(
Here the code you can test it in this site : http://www.pythontutor.com/visualize.html#mode=display
Always the pro with chr and ord
Sorry for the spam :(
Here the code you can test it in this site : http://www.pythontutor.com/visualize.html#mode=display
Always the pro with chr and ord
Msg ="MATHS" def num (caractere): return ord (caractere)-65 def lettre (n): return chr(n) 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= (A*(ord(c)-65)+ B)%26 print(r , end=" | " ) for c in Msg: print(lettre(r), end= " | " )