Challenge 2: Language Processing with Transducer
Test your knowledge by writing code for a transducer.
Problem statement
Write a transducer that performs the following operations in the order specified below:
- Convert all words in a list to their uppercase versions.
- Filter out all words with four or fewer characters.
- Separate all characters in each word with an underscore.
Requirements
Write all your logic inside a function named TransducerChallenge()
. The function must be able to take an array of words as a parameter and return the resulting array after performing all stated operations.
Sample inputs and outputs
Sample input 1
['foo','foobar','maxima','ghost','bar']
Expected output
['F_O_O','B_A_R']
Sample input 2
['run','ran','runner']
Expected output
['R_U_N','R_A_N']
Get hands-on with 1400+ tech skills courses.