Write a Python program that finds the repeating elements in a list containing a sequence. Try to use Python sets to solve this question.
1 2 3 4 12 45 1 2 54 65 77 8 1 2
Repeating elements: {1, 2}
Create a restaurant menu using Python dictionaries and allow the user to order dishes.
You can follow these steps:
Create the restaurant's menu as a Python dictionary. Each dish can be defined as a key, with its price as the value. Print the menu on the screen for the user to view. Ask the user to order dishes. The user can enter a dish name or number. Store the dishes selected by the user in a dictionary. Print the user's orders on the screen and calculate the total price.
Write a program that allows the user to enter a text and then converts this text into Morse code and prints it, or similarly, takes Morse code and converts it back into text. You can use the following Morse code dictionary.
MORSE_CODE_DICT = {'A': '.-', 'B': '-...', 'C': '-.-.', 'D': '-..', 'E': '.', 'F': '..-.', 'G': '--.', 'H': '....', 'I': '..', 'J': '.---', 'K': '-.-', 'L': '.-..', 'M': '--', 'N': '-.', 'O': '---', 'P': '.--.', 'Q': '--.-', 'R': '.-.', 'S': '...', 'T': '-', 'U': '..-', 'V': '...-', 'W': '.--', 'X': '-..-', 'Y': '-.--', 'Z': '--..', '1': '.----', '2': '..---', '3': '...--', '4': '....-', '5': '.....', '6': '-....', '7': '--...', '8': '---..', '9': '----.', '0': '-----', ', ': '--..--', '.': '.-.-.-', '?': '..--..', '/': '-..-.', '-': '-....-', '(': '-.--.', ')': '-.--.-'}
Entry a text: Fenyx IT Academy
Morse code: ..-. . -. -.-- -..- .. - .- -.-. .- -.. . -- -.--