Python Forum
if else with comparison >= does not work
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
if else with comparison >= does not work
#1
hrs = float(input('Enter Hours:'))
rate = float(input ('Enter Rate:'))
h = float(hrs) - 40
r = float (rate) * 1.5
def computepay(h,r):
    retun ((h*r)
if hrs <= 40:
    print (hrs * rate)
else :   
    print(computepay)
Reply


Messages In This Thread
if else with comparison >= does not work - by angelina7382 - Feb-28-2018, 07:20 PM

Forum Jump:

User Panel Messages

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