Hello I need help with my assignment for Microsoft Visual Basic. Here is the que
ID: 3591638 • Letter: H
Question
Hello I need help with my assignment for Microsoft Visual Basic. Here is the question.
Create an application that allows the user to enter a temperature. The application will have one input text box and one output label box per calculation. The input box should be labeled Fahrenheit. The application should have Button controls described as follows:
A button that reads Convert to Kelvin. If the user selects the button, the application will convert the Fahrenheit temperature to Kelvin and place the converted temperature in an output box next to this button.
A button that reads Convert to Rankine. If the user selects the button, the application will convert the Fahrenheit temperature to Rankine and place the converted temperature in an output box next to this button.
A button that reads Convert to Newton. If the user selects the button, the application will convert the Fahrenheit temperature to Newton and place the converted temperature in an output box next to this button.
A button that reads Convert to Delisle. If the user selects the button, the application will convert the Fahrenheit temperature to Delisle and place the converted temperature in an output box next to this button.
A button that reads Convert to All Temps. If the user selects the button, the application will convert the Fahrenheit temperature to all four systems and place the converted temperatures in each output box next to that system’s button.
Create Clear and Exit buttons for the form, as well.
This question is a program code for Miscrosoft Visual Basic. Can this question be moved to the computer science seciton?
Explanation / Answer
from tkinter import * master = Tk() Label(master, text="First Name").grid(row=0) Label(master, text="Last Name").grid(row=1) e1 = Entry(master) e2 = Entry(master) e1.grid(row=0, column=1) e2.grid(row=1, column=1) mainloop( ) from tkinter import * def show_entry_fields(): print("First Name: %s Last Name: %s" % (e1.get(), e2.get())) master = Tk() Label(master, text="First Name").grid(row=0) Label(master, text="Last Name").grid(row=1) e1 = Entry(master) e2 = Entry(master) e1.grid(row=0, column=1) e2.grid(row=1, column=1) Button(master, text='Quit', command=master.quit).grid(row=3, column=0, sticky=W, pady=4) Button(master, text='Show', command=show_entry_fields).grid(row=3, column=1, sticky=W, pady=4) mainloop( ) from tkinter import * def show_entry_fields(): print("First Name: %s Last Name: %s" % (e1.get(), e2.get())) e1.delete(0,END) e2.delete(0,END) master = Tk() Label(master, text="First Name").grid(row=0) Label(master, text="Last Name").grid(row=1) e1 = Entry(master) e2 = Entry(master) e1.insert(10,"Miller") e2.insert(10,"Jill") e1.grid(row=0, column=1) e2.grid(row=1, column=1) Button(master, text='Quit', command=master.quit).grid(row=3, column=0, sticky=W, pady=4) Button(master, text='Show', command=show_entry_fields).grid(row=3, column=1, sticky=W, pady=4) mainloop( )
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.