Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First - Clock Angle solution in Clear category for Clock Angle by AQiccl135
def clock_angle(time):
# Gets individual data elements
hour, minute = time.split(':')
# Calculates the angular position of each hand using the '12' as zero degrees
hour_degree = (int(hour) % 12) * 30 + (int(minute) / 60) * 30
minute_degree = int(minute)* 6
# Calculates one of the two angles between the clock hands, then returns the smaller
angle = abs(hour_degree - minute_degree)
return min(angle, 360 - angle)
Nov. 4, 2014
Comments: