Here is the answer for your question in Python Programming Language.
Question 1
CODE :
| import tkinter as tk """Creates Window and sets its dimensions""" window = tk.Tk() window.geometry("350x200") """Variables to store values from entry boxes""" firstName = tk.StringVar() lastName = tk.StringVar() """Method to quit window""" def quitWindow(): window.destroy() """Method to show name""" def show(): """Gets first and last names and stores them in 'name'""" name = firstName.get() + " " + lastName.get() """Displays name""" resultLabel = tk.Label(window, text="Name : " + name) resultLabel.grid(row = 3, column = 0) """Resets entry boxes""" firstName.set("") lastName.set("") """Required GUI components""" firstNameLabel = tk.Label(window, text="First Name") firstNameEntry = tk.Entry(window, textvariable = firstName, width=25, bd=2) lastNameLabel = tk.Label(window, text="Last Name") lastNameEntry = tk.Entry(window, textvariable = lastName, width=25, bd=2) quitBtn = tk.Button(window, text = "Quit", command = quitWindow) showBtn = tk.Button(window, text = "Show", command = show) """Sets positions for GUI Components""" firstNameLabel.grid(row = 0, column = 0) firstNameEntry.grid(row = 0, column = 1) lastNameLabel.grid(row = 1, column = 0) lastNameEntry.grid(row = 1, column = 1) quitBtn.grid(row = 2, column = 0) showBtn.grid(row = 2, column = 1) window.mainloop() |
SCREENSHOTS :
Please see the screenshots of the code below for indentations of the code.


OUTPUT :

After entering names,
![tk ] X First Name John Last Name Dog Quit Show](http://img.homeworklib.com/questions/941bf460-d7df-11ea-9912-35b558732961.png?x-oss-process=image/resize,w_560)
After pressing "show"

##############################
Question 2
CODE :
| import tkinter as tk from tkinter import messagebox """Creates Window and sets its dimensions""" window = tk.Tk() window.geometry("350x200") """Variables to store values from entry boxes""" firstNum = tk.StringVar() secondNum = tk.StringVar() added = tk.StringVar() """Method to quit window""" def quitWindow(): window.destroy() """Method to show name""" def show(): try: """Gets first and second numbers and stores their sum in 'add'""" add = int(firstNum.get()) + int(secondNum.get()) """Displays sum""" added.set(str(add)) except ValueError: messagebox.showinfo("Error", "Only numbers are allowed") """Required GUI components""" firstNumLabel = tk.Label(window, text="Enter Num 1: ") firstNumEntry = tk.Entry(window, textvariable = firstNum, width=25, bd=2) secondNumLabel = tk.Label(window, text="Enter Num 2: ") secondNumEntry = tk.Entry(window, textvariable = secondNum, width=25, bd=2) resultLabel = tk.Label(window, text="The sum is : ") resultEntry = tk.Entry(window, textvariable = added, width = 25, bd = 2) quitBtn = tk.Button(window, text = "Quit", command = quitWindow) showBtn = tk.Button(window, text = "Show", command = show) """Sets positions for GUI Components""" firstNumLabel.grid(row = 0, column = 0) firstNumEntry.grid(row = 0, column = 1) secondNumLabel.grid(row = 1, column = 0) secondNumEntry.grid(row = 1, column = 1) resultLabel.grid(row = 2, column = 0) resultEntry.grid(row = 2, column = 1) quitBtn.grid(row = 3, column = 0) showBtn.grid(row = 3, column = 1) window.mainloop() |
SCREENSHOTS :
Please see the screenshots of the code below for indentations of the code. As python is a Language of indentations kindly check the indentations before execution.


OUTPUT :

After entering numbers and pressing "Show" button,


Any doubts regarding this can be explained with pleasure :)
object oriented programming solve 2 quetions 9 Lab 8 - Graphical User Interface (GUI) The assignments...
GUI Programming Creating a Kilometer to Miles Converter Lab Assignment Objectives Understand the basics of tkinter GUI development. Based on an informal application specification be able to develop a tkinter GUI program that contains one or more Label widgets. Be able to prompt user for input to a GUI application using a messagebox. Obtain user input into a GUI application that can be used for event driven selection. Be able to develop a tkinter GUI program that supports event-based widgets....
Using Python’s tkinter Graphical User Interface (GUI) module create a Python program to input the number of each type of coin a user has in their possession and then compute and display the total dollar and cents value of these coins. Your solution must accommodate Dollar, Half-Dollar, Quarter, Dime, Nickel, and Penny coins. Your solution must be robust against invalid inputs (i.e., negative value entered into any coin entry widget).
I. User Interface Create a JavaFX application with a graphical user interface (GUI) based on the attached “GUI Mock-Up”. Write code to display each of the following screens in the GUI: A. A main screen, showing the following controls: • buttons for “Add”, “Modify”, “Delete”, “Search” for parts and products, and “Exit” • lists for parts and products • text boxes for searching for parts and products • title labels for parts, products, and the application title B. An add...
The Gui has all the right buttons, but from there i get lost. I need to know whats wrong with my assignment can someone please help. The code I have so far is listed below, could you please show me the errors in my code. PYTHON Create the GUI(Graphical User Interface). Use tkinter to produce a form that looks much like the following. It should have these widgets. Temperature Converter GUI Enter a temperature (Entry box) Convert to Fahrenheit...
JAVA Developing a graphical user interface in programming is paramount to being successful in the business industry. This project incorporates GUI techniques with other tools that you have learned about in this class. Here is your assignment: You work for a flooring company. They have asked you to be a part of their team because they need a computer programmer, analyst, and designer to aid them in tracking customer orders. Your skills will be needed in creating a GUI program...