Welcome to Westonci.ca, the Q&A platform where your questions are met with detailed answers from experienced experts. Discover comprehensive solutions to your questions from a wide network of experts on our user-friendly platform. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals.
Sagot :
The program that is given two integers representing a speed limit and driving speed in miles per hour is given below:
The Program
def ask_limit():
limit = float(input ("What was the speed limit? "))
return limit
def ask_speed():
speed = float(input ("What was your clocked speed? "))
return speed
def findfine(speed, limit):
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
def main():
limit = ask_limit()
speed = ask_speed()
findfine(speed, limit)
main()
Read more about computer programs here:
https://brainly.com/question/23275071
#SPJ1
Thanks for stopping by. We are committed to providing the best answers for all your questions. See you again soon. Thank you for your visit. We're committed to providing you with the best information available. Return anytime for more. Thank you for visiting Westonci.ca. Stay informed by coming back for more detailed answers.