Guest User

Untitled

a guest
Oct 22nd, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. sentence = input("What Swedish word or sentence do you want to translate to Rövarspråk? ")
  2. sentence = sentence.split()
  3. roevar_sentence = ''
  4.  
  5. consonants = {"B", "C", "D", "F", "G", "H", "J", "K", "L", "M", "N", "P", "Q", "R", "S", "T", "V", "W", "X", "Z",
  6. "b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "q", "r", "s", "t", "v", "w", "x", "z"}
  7.  
  8. for word in sentence:
  9. for i in word:
  10. if i in consonants:
  11. roevar_sentence += i + "o" + i
  12. else:
  13. roevar_sentence += i
  14. roevar_sentence += " "
  15.  
  16. print(roevar_sentence)
Add Comment
Please, Sign In to add comment