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.

write a program that is given two integers representing a speed limit and driving speed in miles per hour (mph), calls the function calculate ticket cost() and outputs the traffic ticket amount.

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