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 (except ch 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

Stats:

CreatedOct 11, 2016
PublishedDec 28, 2016
Warriors Trained2525
Total Skips693
Total Code Submissions7130
Total Times Completed504
JavaScript Completions163
Java Completions124
Python Completions181
C# Completions49
Total Stars101
% of votes with a positive feedback rating92% of 151
Total "Very Satisfied" Votes133
Total "Somewhat Satisfied" Votes13
Total "Not Satisfied" Votes5
Total Rank Assessments7
Average Assessed Rank
5 kyu
Highest Assessed Rank
5 kyu
Lowest Assessed Rank
6 kyu
Ad
Contributors
  • dinglemouse Avatar
  • smile67 Avatar
  • Blind4Basics Avatar
  • KataSideKick Avatar
  • hobovsky Avatar
Ad