[Tutor] Very basic help

Gary Calvert calveg@accessus.net
Sat Jan 25 16:00:04 2003


This is a multi-part message in MIME format.

------=_NextPart_000_0002_01C2C482.54F04420
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I am an IT student that is taking a Python programming class and I am =
having
some difficulty.  This class is a math based programming class that =
requires
all math problems to be solved in Python.  My last assignment requires
writing a module and running all of the calculations in the module.  I =
have
attached the code that I have written can anyone help.  This is very =
basic,
I am just beginning the class. =20

------=_NextPart_000_0002_01C2C482.54F04420
Content-Type: text/plain;
	name="overtimemod.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="overtimemod.py"

#overtime module
def wage(x,y):
    return x * y
def overtime(x,y):
    return x * y
def gross(x,y):
    return x + y

------=_NextPart_000_0002_01C2C482.54F04420
Content-Type: text/plain;
	name="9-20.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="9-20.py"

#Problem 9-20
import overtimemod
rate = float(input("Enter your hourly wage\n"))
time = float(input("Enter number of hours straight time worked\n"))
overtime = float(input("Enter number of over time hours worked\n"))
multiplier = float(input("Enter your over time multiplier\n"))

x = overtime(rate,multiplier)
y = gross(overtime,rate)
z = wage(time,rate)
print "Your straight wage is",z
print "Your overtime is",x
print "Your gross pay is",y

           
           
           

------=_NextPart_000_0002_01C2C482.54F04420--