Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Dictionary basics
Dictionaries in loops and conditional statements
Dictionaries in functions
19. Exercise 2


Great! How about this one?


You are given a dictionary that maps letters and digits to Morse code. Write a function named translate_into_morse() that takes a string as an input parameter and returns its Morse representation. If a given character is not available in the dictionary, return it "as it is". Don't forget to uppercase the input string to match our morse dictionary! 😉

Stuck? Here's a hint!

Use the following line to change the case of a string:

text = text.upper()