1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
zaharov [31]
4 years ago
6

Write a GUI program that calculates the average of what an employee earns in tips per hour. The program’s window should have Ent

ry (font: Courier New) widgets that let the user enter the number of hours they worked and amount they earned in tips during they time. When a Calculate button is clicked, the program should display the average amount they got paid in tips per hour. Use the following formula: Tips per hour = amount of tips in dollars / hours.
Computers and Technology
1 answer:
Luba_88 [7]4 years ago
4 0

Answer:

Explanation:

Using Code:

from tkinter import *

#object of Tk class to make GUI

root = Tk()

#creating a canvas to put labels, entries and button

canvas1 = Canvas(root, width = 300, tallness = 200)

canvas1.pack()

#label for number of hours worked

label1 = Label(root, text = "Hours : ", textual style = ('Courier', 10))

canvas1.create_window(80, 50, window = label1)

#entry for number of hours worked

entry1 = Entry(root, textual style = ('Courier', 10))

canvas1.create_window(200, 50, window = entry1)

#label for sum they earned in tips

label2 = Label(root, text = "Tips : ", textual style = ('Courier', 10))

canvas1.create_window(80, 80, window = label2)

#entry for sum they earned in tips

entry2 = Entry(root, text style = ('Courier', 10))

canvas1.create_window(200, 80, window = entry2)

#label for tips every hour

label3 = Label(root, text = "Tips Per Hour : ", textual style = ('Courier', 10))

canvas1.create_window(80, 150, window = label3)

#function to figure tips every hour

def TipsPerHour():

#getting estimation of hour

hours = int(entry1.get())

#getting estimation of tips

tips = int(entry2.get())

#calculating normal sum got paid in tips every hour

normal = tips/hours

#creating a name to show normal

label4 = Label(root, text = "$" + str(average), textual style = ('Courier', 10))

canvas1.create_window(170, 150, window = label4)

#button for compute

calculateButton = Button(root, text = "Compute", textual style = ('Courier', 10), order = TipsPerHour)

canvas1.create_window(170, 110, window = calculateButton)

#mainloop

root.mainloop()

You might be interested in
Which communication technology often takes the place of printed interoffice communication?.
Alexeev081 [22]

Answer:

E-mail

Explanation:

5 0
1 year ago
What is the default font style of “Title” box in MS PowerPoint 2013?
butalik [34]

Answer:

A) Calibri Light

Explanation:

After Office 2013, All versions of PowerPoint title font is "Calibri Light"

7 0
3 years ago
Ile 1 cm<br> ?<br> 50 m<br> The an
otez555 [7]

Answer:

Could you post the full question please

Explanation:

3 0
4 years ago
Read 2 more answers
1. Give state diagrams of DFAs recognizing the following languages. The alphabet is {0, 1}. (a) {w | w is any string except 11 a
storchak [24]

Answer:

Explanation:

The first diagram shows the DFA that accepts that accepts any string except 11 and 111

The second diagram shows every odd position of w is 1

6 0
3 years ago
Why are user manuals important? Select all that apply.
Oksi-84 [34.3K]

Answer:

I. User manuals contain text and images to describe how to use the program features.

II. User manuals explain the commands and syntax of programming languages.

III. User manuals often include chapter on problems and their resolutions.

Explanation:

A user manual can be defined as a clear, detailed and an informative guide drafted by the manufacturer (producer) of a product or service, which is to be given to a customer (end user) so as to help them know and understand how to use the product or service properly.

User manuals are important because they contain the following necessary informations;

I. User manuals contain text and images to describe how to use the program features.

II. User manuals explain the commands and syntax of programming languages.

III. User manuals often include chapter on problems and their resolutions.

Additionally, a user manual contains information on the safety precautions that are to be taken by the end user while using a product or service.

4 0
3 years ago
Other questions:
  • The keyboard preferences pane includes a list of keyboard shortcuts.
    8·1 answer
  • The piece of hardware that contains the circuitry that processes the information coming in to the computer and tells the other h
    8·1 answer
  • To find if the Library owns the item listed below using Quick SearchLinks to an external site., what would you type in the searc
    9·1 answer
  • A technician suspects a network card is not working. Which tool should the technician use to test the network card?
    8·1 answer
  • Digital Subscriber Line (DSL) is the only Internet connection option available for a small office in the middle of nowhere. Whic
    15·1 answer
  • Taking a picture with a wide aperture creates a shallow depth of field. The subject is up close and in focus and defined while b
    12·2 answers
  • If we live 4000 meters from the fire hydrant, how many kilometers away do we live?
    6·2 answers
  • What is the most likely reason that a digital artist would use a program such as Autodesk Maya or Max to create 3-D images for a
    12·1 answer
  • Spreadsheet allow three types of cell addressing. They include ______addresses, such as $E$1, ______addresses, such as R$3, and
    12·1 answer
  • What does a virtual machine emulate?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!