Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

This page removed for FERPA compliance
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Midterm Exam 1 Review Spring 2005: Compute the pay rate

Post your answers, questions, comments, comments on answers, suggestions, suggestions on questions, etc.

Back to Spring2005 Midterm 1 Review



def pay(hours, rate):
  grossPay=(hours*rate)
  if grossPay<100:
    netPay=(grossPay-(grossPay*0.25))
  if grossPay>=200 and grossPay<=300:
    netPay=(grossPay-(grossPay*0.35))
  if grossPay>=300 and grossPay<400:
    netPay=(grossPay-(grossPay*0.45))
  if grossPay>400:
    netPay=(grossPay-(grossPay*0.50))
  print(grossPay)
  print(netPay)


def pay(hours, REMOVEDurRate):
grosspay=(hoursREMOVEDurRate)
if (grosspay100):
netpay=grosspay.75
if (grosspay>=200 and grosspay300):
netpay=grosspay(1-.35)
if (grosspay>=300 and grosspay400):
netpay=grosspay(1-.45)
if (grosspay>=400):
netpay=grosspay.50
print("Gross pay=", grosspay)
print("Net pay=", netpay)


correction on the previoREMOVED post:

print "Gross pay=", grosspay
print "Net pay=", netpay

It mREMOVEDt be really nice to make between 100 and 200!

def pay(hours, hourlyrate):
grossPay=(hourshourlyrate)
if grossPay100:
netPay=(grossPay-(grossPay0.25))
if grossPay>=200 and grossPay=300:
netPay=(grossPay-(grossPay0.35))
if grossPay>=300 and grossPay400:
netPay=(grossPay-(grossPay0.45))
if grossPay>400:
netPay=(grossPay-(grossPay0.50))
print grossPay
print netPay




Link to this Page