Given a string, task is to write a function translate() that will translate a text into “rovarspraket” (Swedish for “robber’s language”). That is, double every consonant and place an occurrence of “o” in between.
Input : this is fun Output : tothohisos isos fofunon t is consonant then double the consonant and place "o" in between, So it becomes "tot" and do this for full string Input : geeks Output : gogeekoksos
gogeekoksos foforor gogeekoksos
This article is contributed by Sahil Rajput. If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above.
- Program to Encrypt a String using ! and @
- Encrypt the given string with the following operations
- Encrypt a string by repeating i-th character i times
- Encrypt string with product of number of vowels and consonants in substring of size k
- Python Language Introduction
- Python – The new generation Language
- Given a sorted dictionary of an alien language, find order of characters
- Create a new string by alternately combining the characters of two halves of the string in reverse
- Lexicographically smallest string formed by appending a character from the first K characters of a given string
- Find the longest sub-string which is prefix, suffix and also present inside the string | Set 2
- Lexicographically smallest string formed by appending a character from first K characters of a string | Set 2
- Minimal moves to form a string by adding characters or appending string itself
- String Range Queries to find the number of subsets equal to a given String
- Find the longest sub-string which is prefix, suffix and also present inside the string
- String slicing in Python to check if a string can become empty by recursive deletion
Improved By : princiraj1992