def smallest_score(lst: list[int]) -> int: ''' Valid sublists have at least 2 elements. Return the smallest score of any valid sublist of lst. lst is guaranteed to have at least 2 elements. ''' in_order = lst[:] in_order.sort() res = in_order[1] - in_order[0] for i in range(len(in_order) - 1): res = min(res, in_order[i+1] - in_order[i]) return res"""Unfortunately, your code is not correct.Below, write a Pytest test case that fails,but that should pass if your smallest_score function were correct.Write ONLY the Pytest test case; don't try to fix the busted smallest_score code."""
# write pytest test function here
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here