SimeonTs

SUPyF2 Text-Pr.-Ex. - 04. Caesar Cipher

Oct 27th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.59 KB | None | 0 0
  1. """
  2. Text Processing - Exercise
  3. Check your code: https://judge.softuni.bg/Contests/Practice/Index/1740#3
  4.  
  5. SUPyF2 Text-Pr.-Ex. - 04. Caesar Cipher
  6.  
  7. Problem:
  8. Write a program that returns an encrypted version of the same text.
  9. Encrypt the text by shifting each character with three positions forward.
  10. For example A would be replaced by D, B would become E, and so on. Print the encrypted text.
  11.  
  12. Examples
  13. Input                   Output
  14. Programming is cool!    Surjudpplqj#lv#frro$
  15. One year has 365 days.  Rqh#|hdu#kdv#698#gd|v1
  16. """
  17.  
  18. print(''.join(chr(ord(letter) + 3) for letter in input()))
Add Comment
Please, Sign In to add comment