Question: Python 3 Write a function possibilities which will take a string signals and return an array of possible characters that the Morse code signals could

Python 3

Write a function possibilities which will take a string signals and return an array of possible characters that the Morse code signals could represent. The signals parameter contains the Morse code signals that needs to be parsed. The may contain one or more unknown signals (?). The returned array or list contains the possible letters for the given group of signals. These letters will always be ordered from how they appear on the chart, from left to right. There will be no more than 3 characters within signals and 0 - 3 unknown signals may be given. Examples possibilities(".") -> ["E"] possibilities("-") -> ["T"] possibilities("-.") -> ["N"] possibilities("...") -> ["S"] possibilities("..-") -> ["U"] possibilities("?") -> ["E", "T"] possibilities(".?") -> ["I", "A"] possibilities("?-?") -> ["R", "W", "G", "O"]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!