Leading Hand (2) X92169


Statement
 

pdf   zip

html

Write a function leading_hand(h, m) that given integers 0 ≤ h < 24 and 0 ≤ m < 60 representing a digital hour returns the leading hand of an analogical watch pointing out that hour. Depending on value parameters the function returns either the string "hour hand", "minute hand" or "draw". Leading hand is the one closest to 12 following the clockwise rotation. We assume hour hand has only 12 possible configurations and minute hand has 60.

Sample session
>>> leading_hand(22, 51)
'minute hand'
>>> leading_hand(21, 45)
'draw'
>>> leading_hand(6, 28)
'hour hand'
>>> leading_hand(4, 20)
'draw'
Information
Author
ProAl
Language
English
Official solutions
Python
User solutions
Python