Question: Question 4 . 1 . Now, complete the implementation of the function emojify, which takes as input two five - letter strings, each having no
Question Now, complete the implementation of the function emojify, which takes as input two fiveletter strings, each having no repeated letters. The first input string, guess, should be crosschecked with each letter of the second input string, answer. The function should return a new string, formed entirely of emojis from the emojis array, that indicates the accuracy of each letter in the guess, as described in the rules above. For example, let's say the answer string is 'shark'. Here is how the function would work on various example guesses.
emojifycrept 'shark'
emojifychalk 'shark'
emojifyharks 'shark'
emojifysharp 'shark'
emojifyshark 'shark'
Note: As we did in the preceding example, use the array emojis to access the emojis don't actually include any colored square emojis in the code you write below.
Hints:
Look at the slide titled Ranges in Lecture for guidance.
You'll need to use the in keyword, which we also introduced in Lecture
Remember to write a general function that works for any answer word, not just 'shark'.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
