Driverfury

Basi Di Crittografia #1

Feb 24th, 2016
480
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def cifra(stringa):
  2.     stringaCifrata = ""
  3.     stringa = stringa.lower()
  4.     for lettera in stringa:
  5.         if ord(lettera) >= 97 and ord(lettera) < 122:
  6.             stringaCifrata += chr(ord(lettera) + 1)
  7.         elif ord(lettera) == 122:
  8.             stringaCifrata += 'a'
  9.         else:
  10.             stringaCifrata += lettera
  11.     return stringaCifrata
RAW Paste Data