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

Instruction

Great! How about this one?

Exercise

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()