So my semester is almost over and I was dumb when I signed up for intro to programming distance learning, I thought I would understand it, but now I guess I know I can't. Anyways here is the problem. A speeding ticket fine policy in Podunksville is $50 plus $5 for each MPH over the limit plus a penalty of $200 for any speed over 90mph. The first function should accept the speed limit, the 2nd function should accept the clocked speed, and the third function should determine and print the fine, if there is one, or print a message indicating that hte speed was legal. Here is what I have so far. I don't know why I keep getting an error in the last line.
def ask_limit(): limit = float(raw_input ("What was the speed limit? ")) speed = float(input ("What was your clocked speed? ")) return limit def ask_speed(): speed = float(input ("What was your clocked speed? ")) return speed def findfine(limit, speed): if speed > 90: bigfine = ((speed - limit) * 5 + 250) print "your fine is", bigfine elif speed < limit: print "you were traveling a legal speed" else: fine = ((speed - limit * 5) + 50) print "your fine is", fine return fine, bigfine def main(fine, bigfine): limit = ask_limit() speed = ask_speed() fine, bigfine = findfine(limit,speed) main()