Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding:Utf-8 -*-
- morzeDict = {"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":"--..","0":"-----","1":".----","2":"..---","3":"...--",
- "4":"....-","5":".....","6":"-....","7":"--....","8":"---..","9":"----,",
- ".":".-.-.-",",":"--..--","?":"..--..",":":"---...",";":"-.-.-.","-":"-....-",
- "=":"-...-","'":".----.","/":"-..-.","*":"-..-","!":"--.--",")":"-.--.-",
- "(":"-.--.","+":".-.-.","@":".--.-.","_":"..--.-"," ":" ","$":"...-..-",}
- szoveg = raw_input("Írd be a Morse kódolandó szöveget: ")
- result = ""
- for i in szoveg:
- if i.lower() in morzeDict:
- result += morzeDict[i.lower()]
- print result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement