The objective of this assignment is to have you revisit the paradigm shift we discuss in the first lecture, where you as the designer focus your efforts, not upon describing "how" a result might be computed, but instead upon "what" each of the components is. For this assignment you will design and implement a program in Python 3 that uses several recursive algorithms to produce a string of words in "Jeringonza" from an initial string in "Kebab Case".

A string that is written in "Kebab Case" uses only lowercase letters and each word is separated by a hyphen (e.g., "robert-collier"). Any word can be written in "Jeringonza" by doubling every vowel sound, inserting the letter 'p' between them, and splitting the word into two words after the 'p' character. (n.b., For this assignment, we operationally define "vowel sound" as one or two instances of any characters 'a', 'e', 'I', 'o', or 'u', but not 'y'.)

As a clarifying example, the word "robert" contains two vowel sounds "o" and "e" and so would be written in Jeringonza as "rop obep ert", and the word "halloween" contains the three separate vowel sounds "a", "o", and "ee", and so would be written as "hap allop oweep een".

The conversion of a string in "Kebab Case" into "Jeringonza" requires transforming the initial "Kebab Case" string into a list of words, and then transforming each word into "Jeringonza". As a clarifying example, the "Kebab Case" string "robert-is-forty-one" would be parsed into the list of words ["robert", "is", "forty", "one"] and then each of those would be converted into "Jeringonza" and combined to produce the string "rop obep ert ip is fop orty op onep e".

For this assignment:

  • you must write three functions (for converting a "Kebab Case" string into a list of words, for converting a single word into a string containing multiple words in "Jeringonza", and for applying your "Jeringonza" converting function to each element of a list and producing a single string result), and these functions must be RECURSIVE in nature (mirroring the generic recursive design pattern presented in class) and must NOT use looping control structures
  • you may use string contatenation and the indexing and slicing operators, but you must NOT import any libraries or use anything that would circumvent the need for creating recursive definitions (e.g., list comprehensions)
  • you must include a simple interface that will allow the teaching assistants to test your code by running it against a valid "Kebab Case" string that they will provide as input and examining the corresponding "Jeringonza" string that you provide as output
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.