One of the possible options could be this – one of the arguments of the function “caught_speeding” is “is_birthday” – so in the input, for example, you can ask whether it is someone’s birthday, and if they reply ‘Yes’, then you add 5 to the speed and calculate the results, otherwise (else), the calculation is done with the original speed – something like this:
def caught_speeding(speed,is_birthday):
if is_birthday == 'Yes':
speed_updated = speed + 5
if speed_updated < 60:
return 'Zero_Updated'
if speed_updated > 60:
return 'One_Updated'
else:
if speed < 60:
return 'Zero'
if speed > 60:
return 'One'
Calling the function with whether the birthday is ‘yes’:
caught_speeding(50, 'Yes')
returns ‘Zero_Updated’
And calling the function with whether the birthday is ‘no’ or any other string:
caught_speeding(50, 'No')
returns ‘Zero’
Hope this is helpful and please let know if anything else could be helpful –