Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function to calculate the fine for speeding. The fine is $35 plus $10 per mile for every mile over the speed limit up
Write a function to calculate the fine for speeding. The fine is $35 plus $10 per mile for every mile over the speed limit up to ten miles over the speed limit. When the speed is more than ten miles over the speed limit, the fine is $135 plus $20 per mile for every mile over the speed limit plus ten miles per hour. Pass the speed and the speed limit to the function. Have function determine the fine and return that value. The output is the amount of the fine.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started