Question: (python) TIL def caughtSpeeding(speed, isBirthday) : Write a function in Python that implements the following logic: You are driving a little too fast, and a

(python)
TIL def caughtSpeeding(speed, isBirthday) : Write a function in Python that implements the following logic: You are driving a little too fast, and a police officer stops you. Write code to compute the result, encoded as an int value: O=no ticket, 1=small ticket, or 2=big ticket. If speed is 60 or less, the result is 0. If speed is between 61 and 80 inclusive, the result is 1. If speed is 81 or more, the result is 2. Unless it is your birthday -- on that day, your speed can be 5 higher in all cases. pass def noTeenSum(a, b, c): Write a function in Python that implements the following logic: Given 3 int values, a, b, and c, return their sum. However, if any of the input values is a teen -- in the range 13..19 inclusive--then that value counts as o, except that 15 and 16 do not count as teens. pass
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
