Re: [Tutor] if-elif-else statements

2005-10-13 Thread Danny Yoo
On Thu, 13 Oct 2005 [EMAIL PROTECTED] wrote: > amount is supposed to equal fine because there are a couple of different > fines. there is a fine for going over 90mph that includes a penalty and > then there is a fine for just going over the speed limit as long as it > is under 90. Hi Andradel,

Re: [Tutor] if-elif-else statements

2005-10-13 Thread Carroll, Barry
s should give you the results you want. BGC -- >Date: Thu, 13 Oct 2005 19:13:39 -0400 (EDT) >From: [EMAIL PROTECTED] >Subject: Re: [Tutor] if-elif-else statements >To: [EMAIL PROTECTED] >Cc: tutor@python.org >Message-ID: <[EMAIL PROTECTED]>

Re: [Tutor] if-elif-else statements

2005-10-13 Thread Akbar Pasha
I think you should check the if conditions with "clocked" not speedlimit which is the differential. ::akbarOn 10/13/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: amount is supposed to equal fine because there are a couple of differentfines. there is a fine for going over 90mph that includes a p

Re: [Tutor] if-elif-else statements

2005-10-13 Thread Jason Massey
More than anything, I think clearer variable names will help here. Something like: def main(): ... speed_limit = 60 ... clocked = int(raw_input("Clocked speed:")) ... miles_over = clocked - speed_limit ... fine = 50 + 5 * miles_over ... if miles_over >= 30: ... pri

Re: [Tutor] if-elif-else statements

2005-10-13 Thread andrade1
amount is supposed to equal fine because there are a couple of different fines. there is a fine for going over 90mph that includes a penalty and then there is a fine for just going over the speed limit as long as it is under 90. > Is amount suppose to equal total instead of fine? > > > > On Thurs

Re: [Tutor] if-elif-else statements

2005-10-13 Thread Eric Walker
Is amount suppose to equal total instead of fine? On Thursday 13 October 2005 04:58 pm, [EMAIL PROTECTED] wrote: > def main(): >     actual = input("Please enter the legal speed limit: ") >     clocked = input("Please enter the clocked speed limit: ") >     speedlimit = clocked - actual > >    

[Tutor] if-elif-else statements

2005-10-13 Thread andrade1
Hello I am having trouble getting my program to calculate the correct total if the speed limit is over 90mph. For example when i enter 100 for the clocked speed and 50 for the actual speed it returns 300 when I should receive 500. It also seems to be skipping over the else statement of if the pers