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
If we assume the modern view of existential import, why is the following syllogism invalid? No computer is made of clay. All com
Papessa [141]

Answer:

<u>because the conclusion is not in agreement with the two premises.</u>

Explanation:

<em>Remember</em>, the term<u> syllogism</u> refers to the form of reasoning that draws its conclusion based on the stated premises. In other words, a conclusion is reached if it satisfies <em>all or part </em>of the premises.

In this case, the statement "No computer is made of clay" and  "All computers are electronic devices" should be inferred to mean, <em><u>No </u></em><em>electronic devices are made of clay" </em>not<em> </em><em>"Some electronic devices are not made of clay," </em>since the two premises neither suggest that electronic devices are made from clay.

5 0
2 years ago
True or False
anastassius [24]

I used this from a other.

False

Software is the collection of large program or instruction of codes, which is used to perform some task. It is of two types of system software and application software.

The system software is used as a container for the application software and it is used to handle all other software it is used to operate the system.

Application software is used to perform any operation. This type of software can be used by the user if it is installed on the local machine on any system software

The operating system is also the part of the system software because it is used to operate the system and it is also the soul of the computer system which is also the function of the system software but the above question states that the operating system is not the part of the system software which is not correct. Hence false is the correct answer to the above question.

5 0
3 years ago
What three best practices can help defend against social engineering attacks?
lina2011 [118]

The three best practices that can help protect against social engineering are:

  • Be watchful of instructions to click on enticing web links.
  • Educate employees regarding policies.
  • Avoid disclosing your login details.
<h3>Social engineering</h3>

This refers to online crimes that are socially engineered or designed to trick victims into providing certain information or carrying out certain actions that would cause unknown harm to them or others.

For example, they may be tricked into revealing their security information or other personal information via email correspondence.

You can learn more about social engineering here brainly.com/question/26072214

#SPJ12

6 0
2 years ago
8.2 code practice edhesive?
Illusion [34]

Answer:

temperatures = []

i = 0

while i < 5:

   try:

       t = int(input('Enter a temperature: '))

       temperatures.append(t)

       i += 1

   except ValueError:

       print('Enter a number')

print(temperatures)

Explanation:

Hope this helps!

6 0
3 years ago
Just five types of pointing device,list
posledela

Answer:

five types of pointing devices

Explanation:

Ponting devices

Pointing means point something and the pointing devices are the input /peripheral devices those are used to point the pointer on the screen. We do move cursor on the screen to open the files or any icon.

There are many types of pointing devices but these are quite common which are given below

  1. Computer mouse
  2. Finger on touch screen.
  3. Joystick.
  4. Leap Motion.
  5. Light pen (pen)

1.Mouse

Mouse is most common type of input device that is used for pointing the data on the screen. We press it with our hands and keep pointing the things.

There are three types of mouse

  1. optical mouse
  2. wireless mouse
  3. trackball mouse.

2. Finger on touch screen

In this type of movement the fingers are input devices those we use to see the movement of pointer on the screen and this is most common in this century.

3.Joystick.

Joystick is another input device to point the cursor but it is mostly used in games. Children can use it smartly so it is inculcated in games usually.

4. Leap Motion

The Leap Motion (LM) controller is a latest 3D sensing device for hand posture interaction with a computer. It is having the capability sense the location of the fingers of the hands, as well as the palm position.

5.Light Pen

this is another pointing device which is mostly used to highlight and select the data on the screen.

Note: All of these above pointing devices are most common used now a days. These devices are having new  conventions day by day for the ease of user. This era is basically the era of IT ,so the use of computer must be so easy and conventional for the user so, the innovations and improvement in such devices is made side by side.

3 0
3 years ago
Other questions:
  • When an Ethernet frame arrives at a computer, the Ethernet layer must hand the packet that it contains to the next higher layer
    9·1 answer
  • Laura has identified the job she wants, the skills needed for the position, and the areas she needs to improve in order to get i
    10·1 answer
  • IT professionals have a responsibility to educate employees about the risks of hot spots. Which of the following are risks assoc
    13·1 answer
  • Please check my answer! (Java)
    13·1 answer
  • Reversing the elements of an array involves swapping the corresponding elements of the array: the first with the last, the secon
    6·1 answer
  • A bluetooth network consists of _____ primary device(s) and up to ____ secondary devices.
    8·1 answer
  • Calculate the cash available to retire debt for each of the six months. There is cash available to retire debt if there is a cas
    8·1 answer
  • What are the 3 dimension of an information system?
    13·1 answer
  • How to mark a discussion as read on canvas dashboard.
    10·1 answer
  • What is the greatest number of bits you could borrow from the host portion of a class B subnet mask and still have at least 130
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!