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,
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]>
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
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
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
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
>
>
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