Your question is Angle Between Clock Hands. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Clearwater Analytics systems may receive time values that need to be converted into geometric features for validation or visualization. Given an hour and minute on a 12-hour analog clock, calculate the smaller angle between the hour and minute hands.
The hour hand moves continuously as the minutes advance. For example, at 3:30, the hour hand is halfway between 3 and 4, not exactly on 3.
Implement clock_angle(hour, minute).
hour, an integer from 1 through 12, and minute, an integer from 0 through 59.[0, 180].def clock_angle(hour, minute):