Re: help with a function

2006-05-16 Thread Paul McGuire
"Paul McGuire" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > "Lance Hoffmeyer" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Hey all, > > > > I'm new to python. I keep getting an error when running this. > > I'm sure there is an easy fix but I can't figure it ou

Re: help with a function

2006-05-16 Thread Paul McGuire
"Lance Hoffmeyer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hey all, > > I'm new to python. I keep getting an error when running this. > I'm sure there is an easy fix but I can't figure it out. > What am I doing wrong? How do I fix it? > > def even_odd_round(num): > if(round

Re: help with a function

2006-05-16 Thread Ben Finney
Lance Hoffmeyer <[EMAIL PROTECTED]> writes: > def even_odd_round(num): > if(round(num,2) + .5 == int(round(num,2)) + 1): >if(int(num,0) % 2):#an odd number > rounded_num = round(num,2) + .1 >else: #an even n

help with a function

2006-05-16 Thread Lance Hoffmeyer
Hey all, I'm new to python. I keep getting an error when running this. I'm sure there is an easy fix but I can't figure it out. What am I doing wrong? How do I fix it? def even_odd_round(num): if(round(num,2) + .5 == int(round(num,2)) + 1): if(int(num,0) % 2):