Please
Help me to create Morse code program on python3 by using tkinter ?
Points to consider:
Code
import tkinter as tk class Morse: def __init__(self): self.m = tk.Tk() self.out = tk.StringVar() label1 = tk.Label(self.m, text = 'Input') self.input = tk.Entry(self.m) label2 = tk.Label(self.m, text = 'Output') self.output = tk.Entry(self.m, textvariable=self.out) self.button = tk.Button(self.m, text = 'Find', command=self.morseCode) label1.pack(side='left') self.input.pack(side='left') label2.pack(side='left') self.output.pack(side='left') self.button.pack(side='left') tk.mainloop() def morseEncode(self,x): # refer to the Morse table # image attached in the article if x == 'a': return ".-" elif x == 'b': return "-..." elif x == 'c': return "-.-." elif x == 'd': return "-.." elif x == 'e': return "." elif x == 'f': return "..-." elif x == 'g': return "--." elif x == 'h': return "...." elif x == 'i': return ".." elif x == 'j': return ".---" elif x == 'k': return "-.-" elif x == 'l': return ".-.." elif x == 'm': return "--" elif x == 'n': return "-." elif x == 'o': return "---" elif x == 'p': return ".--." elif x == 'q': return "--.-" elif x == 'r': return ".-." elif x == 's': return "..." elif x == 't': return "-" elif x == 'u': return "..-" elif x == 'v': return "...-" elif x == 'w': return ".--" elif x == 'x': return "-..-" elif x == 'y': return "-.--" elif x == 'z': return "--.." def morseCode(self ): s = self.input.get() output = '' for character in s: output += self.morseEncode(character) self.out.set(output) if __name__ == "__main__": Morse()
Code Snippet
Output Snippet
Friend, That was
a nice question to answer
If you have any doubts in understanding do let me know in the
comment section. I will be happy to help you further.
Please like it if you think effort deserves like.
Thanks
Please Help me to create Morse code program on python3 by using tkinter ?
Program Description: A Java program is to be created to produce Morse code. The Morse code assigns a series of dots and dashes to each letter of the alphabet, each digit, and a few special characters (such as period, comma, colon, and semicolon). In sound-oriented systems, the dot represents a short sound and the dash represents a long sound. Separation between words is indicated by a space, or, quite simply, the absence of a dot or dash. In a sound-oriented...
Program Description: A C# app is to be created to produce Morse code. The Morse code assigns a series of dots and dashes to each letter of the alphabet, each digit, and a few special characters (such as period, comma, colon, and semicolon). In sound-oriented systems, the dot represents a short sound and the dash represents a long sound. Separation between words is indicated by a space, or, quite simply, the absence of a dot or dash. In a sound-oriented...
" In the workshop exercises you have used Python's Tkinter module to create simple Graphical User Interfaces. The following code is an incomplete Python program relying on Tkinter (with deliberately unhelpful variable and function names) which you must complete by filling in the blanks. When complete the program should create a window with two buttons, labelled and!!', respectively. When the button la belled'???' is pushed nothing happens. When the button labelled'!!"is pushed both buttons' labels are set to'!!!' from tkinter...
PYTHON3 code Each of you will create a cash register / point of sale for your favorite retail establishment (restaurant, store, website, etc..). The program should have a way to input an indefinite number of items (items, quantities, price); This should be stored as a list of lists in your program. It should generate a "receipt" - a list of items showing what you bought; It should generate a total amount spent including a tax computation. It should be written...
Morse Code Encryption/Decryption Program - Develop and test a Python program that allows a user to type in a message and have it converted into Morse code, and also enter Morse code and have it converted back to the original message.
Use PYTHON3 to create a program that asks the user for their name, and then prints their initials. You must create a function called getInitials() that takes the name string and prints out the initials. It must be case insensitive and the initials must be printed in upper case. The program must contain a main() and a function called getInitials(), implemented as described in the function header comment given below. (You should include this function header comment in your own...
Where did the frequencies come from to create Morse code?
Using Python, please write a program that draws the following shapes using turtles and tkinter: Tetrahedron Cube Octahedron Dodecahedron Icosahedron Please make sure they're drawn out using only lines in the 2D dimension. All the shapes need to be in the same window. No need to color them. Thank you.
Please write code using Python.
Rubric
Assignment Solution Total: 100 pts
Program successfully retrieves and validates user input 15
pts
Morse Code Function Created 10 pts
Function Uses Parameters to get input message 15 pts
Function successfully converts passed message to Morse Code
and returns the Morse Code equivalent of message 45 pts
Program calls Morse Code function and outputs the result of
the function (i.e. the actual Morse Code) 15 pts
Main Function Requirement
Part 2 MUST have a...
Hi,
Can you help me with Python using Tkinter? Please read all
requirements and could you pls do it as simple as possible!
Aa- AaBbC AaBbCel AalBbCel AaßbCcD AaBbC AaBbCel AaBbCcl AaBbCcl Pind - Replace b Select IU-b x, x A A- Heading 1 1 Heading 3 1 Normal Subtde Tle 1 No Spac Subtle Em Emphasis Fon Paragraph Styles Editng Perform the Following Tasks Use Tkinter Graphics Design a simple graphical program Task 1: as indicated below: nts put...