fork download
  1. input_text = "Hello World!"
  2. output_text = ""
  3.  
  4. from_map = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
  5. to_map = "NOPQRSTUVWXYZABCDEFGHIJKLMnopqrstuvwxyzabcdefghijklm"
  6.  
  7. for character in input_text:
  8.  
  9. search_index = 0
  10.  
  11. while search_index < len(from_map) and character != from_map[search_index]:
  12. search_index = search_index + 1
  13.  
  14. if search_index == len(from_map):
  15. output_text = output_text + character
  16. else:
  17. output_text = output_text + to_map[search_index]
  18.  
  19. print(output_text)
  20. # your code goes here
Success #stdin #stdout 0.07s 14032KB
stdin
Standard input is empty
stdout
Uryyb Jbeyq!