Python Forum
Python for Everybody 3.1 assignment
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python for Everybody 3.1 assignment
#17
You are paying 2.5 times for overtime.
if hours > 40:
    pay = hours * rate  # paid for overtime at regular rate
    overtime = (hours -40) * rate * 1.5  # and more pay for overtime at 1.5 * rate
This is not a programming error and has nothing to do with python. This is a logic error. I think you are too worried about how to solve your problem in python when you should instead be focusing on how to solve the problem and then implementing your solution in python.

You are not alone. I fall into the same trap at times and when I eventually step away from the computer and look at what I was doing I am appalled. The most important lesson I could teach you is that programming is a multi-part task. The first, and most important element is design, and that should occur away from the computer.
Reply


Messages In This Thread
RE: Python for Everybody 3.1 assignment - by Mr_W - Jan-06-2019, 06:24 PM
RE: Python for Everybody 3.1 assignment - by Mr_W - Jan-07-2019, 12:12 PM
RE: Python for Everybody 3.1 assignment - by deanhystad - Apr-27-2020, 06:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Python for Everybody 5.2 assignment baba04201 20 173,470 Jul-25-2023, 04:15 PM
Last Post: MicaelSchutz
  Coursera python for everybody 5.2 assignment SteppentigerV2 11 12,906 Oct-22-2020, 11:57 AM
Last Post: Larz60+
  [split] Python for Everybody 5.2 assignment ramadan2099 3 12,082 Jul-15-2020, 04:54 PM
Last Post: Bipasha
  Python Assignment 3 - Applied Data Science - 2.3 eyavuz21 8 4,985 Jun-06-2020, 08:59 AM
Last Post: eyavuz21
  Python Password Saver Assignment sshellzr21 2 6,202 May-02-2020, 01:34 AM
Last Post: sshellzr21
  Python for Everybody 3.3 assignment ramadan2099 7 31,783 Apr-08-2020, 06:49 AM
Last Post: DeaD_EyE
  Python for everyone course assignment 5.2 ofekx 3 8,559 Dec-23-2019, 08:41 PM
Last Post: nilamo
  [split] Python for Everybody 5.2 assignment jonchanzw 4 8,492 Oct-22-2019, 08:08 AM
Last Post: perfringo
  Python Assignment 5.2 amos76823 3 15,985 Jan-17-2019, 07:34 AM
Last Post: perfringo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020