Re: [Tutor] Calaculating a monthly total of earning

2011-01-16 Thread Ken Green
Alan, the last two paragraphs you wrote is classic. Very, very true. LOL. Ken On 01/16/2011 07:32 PM, Alan Gauld wrote: Python is so tempormential what is wrong with my code? Python is not temperamental, it is just doing exactly what you ask it to do. It makes no judgement about whether

Re: [Tutor] Calaculating a monthly total of earning

2011-01-16 Thread Noah Hall
>     minus_weekends=hourly_income*64 >     total_income=int(minus_weekends-sum_of_monthly) Here's problem number 1 - you're taking the values the wrong way around :) It should be total_income=int(sum_of_monthly-minus_weekends) >     sum_of_monthly=int(yearly_income/12) Here's the second problem

Re: [Tutor] Calaculating a monthly total of earning

2011-01-16 Thread Alan Gauld
"walter weston" wrote def income_report(yearly_income,hourly_income): sum_of_monthly=int(yearly_income/12)# his yearly income dividing by 12. minus_weekends=hourly_income*64 total_income=int(minus_weekends-sum_of_monthly) return sum_of_monthly,total_income When you divide you

[Tutor] Calaculating a monthly total of earning

2011-01-16 Thread walter weston
Heres my code: def income_report(yearly_income,hourly_income): """ this will count the average of your total monthly income""" sum_of_monthly=int(yearly_income/12)# his yearly income dividing by 12. minus_weekends=hourly_income*64 #the 64 is the two days off for the weekend(assuming