Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- c=lambda c,s:chr((ord(c)-(b:=65*c.isupper()+97*c.islower())+s%26+26)%26+b) if c.isalpha() else c
- def t(p="Odszyfrowac? (T/N): "):
- while(o:=input(p).lower().strip())not in{'t','n'}:print("Prosze wybiez T lub N.")
- return o=='t'
- print("Zaszyfruj swoja wiadomosc")
- print(''.join(c(x,3)for x in input()))
- print()
- if t():
- print("\nco chcesz odszyfrowac?")
- print(''.join(c(x,-3)for x in input()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement