PY-8
Find the First Acceptable Value
Task
Write find_first_acceptable(values, lower, upper). Read the numbers in
values from left to right and find the first number in the inclusive interval
from lower through upper.
Return a three-item tuple:
(value, index, found)
valueis the first acceptable number.indexis its zero-based position invalues.foundisTruewhen an acceptable number exists andFalseotherwise.
When no value is acceptable, return (None, None, False). The input list must
not be changed. The lower and upper boundaries are both included.
Example
The 12 is outside the interval, so the first acceptable value is 7 at
index 2. A value equal to either boundary is acceptable:
Your implementation
Edit solution.py and keep this function name and signature:
values is a list of numbers and lower and upper are numbers. Return the
required tuple; do not print it or ask for input.