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
At the aquarium Grandma Simpson hugged the dolphin is that passive or active sentence​?
geniusboy [140]

It is passive, because it says the grandma huggED the dolphin.

Active would be “Grandma Simpson hugs the dolphin at the aquarium.”

5 0
4 years ago
Human-centered technology often recommends _______ao
lidiya [134]

Answer:

Creating objects which people are going to interact with, designers have to be aware of those traits and take them into account in the process. ... Continuing the theme, user-centered design is more focused and concise version of human-centered design with deeper analysis of target audience.The user interacts directly with hardware for the human input and output such as displays, e.g. through a graphical user interface. The user interacts with the computer over this software interface using the given input and output (I/O) hardware.Human-centered design is a creative approach to problem solving and the backbone of our work at IDEO.org. It's a process that starts with the people you're designing for and ends with new solutions that are tailor made to suit their needs. ... Human-centered design consists of three phases.

Explanation:

3 0
3 years ago
Read 2 more answers
Go to the Subset tab, which gives a subset of randomly chosen data from the first tab. Go to your Math Tools and open the Graph
Karo-lina-s [1.5K]

A linear regression model is used to show the relationship between variables on a scatter plot

The equation of the linear regression model is: \^y = 1.56\^x + 1.29 and the correlation coefficient is 0.8034

<h3>How to determine the equation of the linear regression</h3>

The question is incomplete. So, I will make use of a dataset that has the following calculation summary (from a graphing calculator)

  • Sum of X = 45
  • Sum of Y = 83
  • Mean X = 4.5
  • Mean Y = 8.3
  • Sum of squares (SSX) = 82.5
  • Sum of products (SP) = 128.5
  • The value of R is 0.8034.

The equation of the linear regression model is:

\^y = 1.56\^x + 1.29

See attachment for the scatter plot

Read more about linear regression model at:

brainly.com/question/26347582

5 0
3 years ago
The set of specific, sequential steps that describe exactly what a computer program must do to complete the work is called a(n)
STatiana [176]

Answer:

algorithm

Explanation:

7 0
3 years ago
What type of machine is a hand drill?<br><br> A. Simple machine <br> B. Compound machine
Shalnov [3]
<span>It is a Compound machine.</span>
7 0
4 years ago
Read 2 more answers
Other questions:
  • Which of the following makes videos appear smoother and more fluid?
    9·2 answers
  • Help please?
    10·1 answer
  • What is the function of a computer screen?
    5·1 answer
  • How to turn off new macbook pro when it is frozen 2017
    11·2 answers
  • The acronym ________ is used by programmers to refer to the fact that computers cannot tell difference between good and bad data
    8·2 answers
  • WILL GIVE BRAINLEIST PLZ HELP PLZ AND THANK YOU
    7·1 answer
  • What are the common internal components to most electronic devices?
    10·1 answer
  • Denelle, an accountant, needs to present her client Stephen with a page showing how his yearly retirement savings will be affect
    11·1 answer
  • Which type of backup ensures you capture a complete snapshot of everything that makes your computer run?.
    10·1 answer
  • Which agency motors the sale and registration of vehicles and vessels within the state
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!