[Tutor] Very basic help

Jay Dorsey jay@jaydorsey.com
Fri Jan 31 00:48:16 2003


The first thing I see you need to fix is the references to your imported 
functions from the overtimemod module.  In your 9-20.py file, since you 
imported overtimemod (instead of "from overtimemod import *" - which you 
wouldn't want to do now anyways since you call one of your variables the 
same name as one of the functions from yoru module - "overtime"), you 
need to prefix all of your function calls with the name of the module 
(overtimemod.)  See below for an example.  You may want to check your 
functions as well - I ran the program after I made the changes below, 
but the results didn't look correct (I'm no math major though).

Hope this helps,

jay

>#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 = overtimemod.overtime(rate,multiplier)
>y = overtimemod.gross(overtime,rate)
>z = overtimemod.wage(time,rate)
>print "Your straight wage is",z
>print "Your overtime is",x
>print "Your gross pay is",y
>  
>