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]
3 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]3 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
The wildcard character * (asterisk/start) and ? (question mark) are the same and can be use interchangeably.
vova2212 [387]
The answer is false.
6 0
3 years ago
What is <br> central vision
ser-zykov [4K]
Look for it in the dictanory
7 0
3 years ago
Read 2 more answers
A company has a hybrid ASP.NET Web API application that is based on a software as a service (SaaS) offering.Users report general
kobusy [5.1K]

Answer: B. Azure Data Lake Analytics and Azure Monitor Logs

Explanation:

There is a feature on Azure Monitor called Application Insights. This feature offers clients the ability to implement live monitoring of applications as well as detect anomalies.

With its analytics tools, clients can diagnose the issues reported by users as well as follow and understand the activities of users.

5 0
3 years ago
The Quick Search capability is found on which control?
choli [55]

Answer:

backstage view

Explanation:

6 0
3 years ago
Zach follows the instructions that show him how to create a custom Web site in his school's learning management system. These st
NNADVOKAT [17]

Answer:

The answer is "Procedure"

Explanation:

In the given statement certain information is missing, that is choices, which can be described as follows:

a. procedure

b. software

c. data

d. hardware

e. memory

The procedure is a way, that accomplishes any task in the following steps, if there is a long process so, we divide this process into parts or modules to accomplish the task, and  certain alternative was wrong, that can be described as  follows:

  • Software is a program, that is accomplished in the procedure.
  • data, It describes all procedures.
  • hardware, It is a device, in which we work.
  • memory, It stores all the data in a procedure.    
3 0
3 years ago
Other questions:
  • How does the use of modules provide flexibility in a structured programming design?
    14·2 answers
  • All of the following statements correctly describe an advantage or disadvantage associated with the use of Monte Carlo Analysis
    9·1 answer
  • âwhat two log files are used by older versions of unix and newer version of linux to store log information
    10·2 answers
  • Why is it a mistake to put email addresses of people who don't know each other in the "To:" field?
    8·2 answers
  • A. Draw a flowchart or write pseudocode to represent the logic of a program that allows the user to enter an hourly pay rate and
    8·1 answer
  • Write c++ program bmi.cpp that asks the user bmi.cpp the weight (in kilograms) and height (in meters).
    12·1 answer
  • Project manager George is defining project management to his team. How should he define project management in one sentence?
    7·1 answer
  • a bus is full of passengers. if you count them by either twos, threes, or fives, there is one left. if you count them by seven t
    10·1 answer
  • Please help this is a coding assignment I need help! (use python)
    12·1 answer
  • Which of the following is a productivity strategy for collaboration?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!