Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Sport Watch by michaelkonev
def pace_adjust(h1: int, h2: int, s: int) -> int:
if h2 > h1*3 or s < 95:
res = -1
elif h2 < h1*2 and s > 97:
res = 1
else:
res = 0
return res
print("Example:")
print(pace_adjust(60, 180, 97))
# These "asserts" are used for self-checking
assert pace_adjust(60, 190, 98) == -1
assert pace_adjust(70, 140, 92) == -1
assert pace_adjust(70, 130, 98) == 1
print("The mission is done! Click 'Check Solution' to earn rewards!")
Dec. 18, 2024
Comments: