On 01/11/13 18:43, Jenny Allar wrote:
but I'm having issues passing values from one function to another.
I'm not sure what you are asking. The error is pretty clear and the
cause is as described - you don;t pass any arguments to the function...
def main():
gethours()
print()
The traceback shows:
> TypeError: calcandprint() missing 2 required positional arguments:
> 'hrswrkd' and 'payrate'
and the definition of calcandprint is
> def calcandprint (hrswrkd, payrate):
which shows it requiring two parameters: 'hrswrkd' and 'payrate'
so the proper way to call the func
On 01/11/2013 18:43, Jenny Allar wrote:
gethours() #Call the function that gets the hours worked payrate
You throw away hrswrkd and payrate from gethours here
print()
calcandprint() # Call the function that calculates and prints the
Then you call calcandprint with no arguments
Hi everyone,
I'm onto my next assignment and I think I have the basics together,
but I'm having issues passing values from one function to another. I'm
using Python 3.3.2 on Windows 7 and below is my assignment and code
with the error that's got me hung up.
Thanks in advance for your help.
Assig