5 kyu
Would you believe... Talk like Siegfried
181 of 504dinglemouse
Description:
Do you ever wish you could talk like Siegfried of KAOS ?
YES, of course you do!
https://en.wikipedia.org/wiki/Get_Smart

Task
Write the function siegfried
to replace the letters of a given sentence.
Apply the rules using the course notes below. Each week you will learn some more rules.
Und by ze fifz vek yu vil be speakink viz un aksent lik Siegfried viz no trubl at al!
Lessons
Week 1
ci
->si
ce
->se
c
->k
(exceptch
leave alone)
Week 2
ph
->f
Week 3
- remove trailing
e
(except for all 2 and 3 letter words) - replace double letters with single letters (e.g.
tt
->t
)
Week 4
th
->z
wr
->r
wh
->v
w
->v
Week 5
ou
->u
an
->un
ing
->ink
(but only when ending words)sm
->schm
(but only when beginning words)
Notes
- The transformations described in the "Lessons" are case-insensitive
- The output must retain the case of the original sentence
- Apply rules strictly in the order given above
- Rules are cummulative. So for week 3 first apply week 1 rules, then week 2 rules, then week 3 rules
Regular Expressions
Fundamentals
Similar Kata:
Stats:
Created | Oct 11, 2016 |
Published | Dec 28, 2016 |
Warriors Trained | 2525 |
Total Skips | 693 |
Total Code Submissions | 7130 |
Total Times Completed | 504 |
JavaScript Completions | 163 |
Java Completions | 124 |
Python Completions | 181 |
C# Completions | 49 |
Total Stars | 101 |
% of votes with a positive feedback rating | 92% of 151 |
Total "Very Satisfied" Votes | 133 |
Total "Somewhat Satisfied" Votes | 13 |
Total "Not Satisfied" Votes | 5 |
Total Rank Assessments | 7 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 6 kyu |