▾ Part 4: Ubbi Dubbi Wubbi (10 points) In this part you will implement a variant of the fictional ubbi dubbi "language".

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
correctanswer
Posts: 43759
Joined: Sat Aug 07, 2021 7:38 am

▾ Part 4: Ubbi Dubbi Wubbi (10 points) In this part you will implement a variant of the fictional ubbi dubbi "language".

Post by correctanswer »

Part 4 Ubbi Dubbi Wubbi 10 Points In This Part You Will Implement A Variant Of The Fictional Ubbi Dubbi Language 1
Part 4 Ubbi Dubbi Wubbi 10 Points In This Part You Will Implement A Variant Of The Fictional Ubbi Dubbi Language 1 (57.94 KiB) Viewed 89 times
▾ Part 4: Ubbi Dubbi Wubbi (10 points) In this part you will implement a variant of the fictional ubbi dubbi "language". Given an entirely lowercase word stored in the argument word, the ubbi_dubbi function adds ub before each vowel in word. Special care must be taken with existing u characters in the word. For example, a u that is inserted as part of a new ub pair should not be replaced with ubu. After this first transformation has completed, the ubbi_dubbi function then finds the leftmost occurrence of bub in the transformed string. All letters to the left of bub and the bub itself are removed from the front of the string and appended to the end. For instance, tube becomes tububube after the first transformation, and then ubetubub after the second transformation. If bub is not present in word after the first transformation has finished, then the second transformation is skipped. Examples: Return Value Function Call ubbi_dubbi (cat) cubat ubbi_dubbi (up²) ubup ubupsubidube ubumbrubelluba ubbi_dubbi (upside') ubbi_dubbi (umbrella') ubbi_dubbi (tummy) ubbi_dubbi (banana') tubummy anubanubabub ubbi_dubbi (butter') uttuberbub ubbi_dubbi (hubbub') bububhubub ubbi_dubbi (tube') ubetubub
Register for solutions, replies, and use board search function. Answer Happy Forum is an archive of questions covering all technical subjects across the Internet.
Post Reply