In my previous post, I described how I devised a programming problem for an internal company contest with the help of the ubiquitous ChatGPT. Also, ChatGPT provided a solution for the problem as part of the development process. Even more interestingly the language model provided a fictional context for justifying the problem.
The task was to write a function
removeVowels( string text ) which takes an arbitrary text (arbitrary as long as it contains no uppercase letters) and returns the same string where vowels have been removed. Given the string “hello world”, the result should be “hll wrld”.
The implementation must not have:
- if statement
- list comprehension
If you want to give it a try before reading the solution, stop here. Otherwise, follow me.Continue reading “Speak Slowly, no Vowels, pls – Solutions”