If there is anybody here that is good with geometry, you have to find the angle of the clock hands, the smaller angle. The third is the hardest one on the list.

goooooo!

The approach I would take to this is to first ask what angle each hand covers in a given period of time. The minute hand for instance is fairly easy to express as covering 360/60=6 degrees per minute, or 6/60=0.1 degrees per second. 1:26:18 is a known number of seconds after 12, so the absolute angle of each hand can be compared. (Exact computations are left as an exercise for the student.)

Good job. Would you like to give the "exact computations" a try?

No, because I have no proof that you already know the answer and don't want to do your homework for you.

You are right. I have proof, but should I dm it to you? This was not my homework, just a review packet for an upcoming test, I thought it would be a fun challenge.

Just wanted to pitch in, after a brief discussion over SAX, arusher999 sent me the correct (save for one small miscalculation) answers, I can confirm he already has the answers to the exercise and this is not an attempt to get them from us. Feel free to go ahead with the challenge if you feel like it.

Thanks for verifying, Nik.

Expressed as a Python function, since that pretty clearly follows my thought process of solving this:

**Code:** ```
def hands_angle(time: datetime.timedelta) -> float:
```

seconds = time.total_seconds()

# Hour hand traverses 360 degrees in 12 hours

hour_hand_angle = seconds / (360 * 3600 * 12)

# Minute hand traverses 360 degrees in 1 hour

minute_hand_angle = seconds / (360 * 3600)

# Clamp each angle to 1 full revolution

hour_hand_angle %= 360

minute_hand_angle %= 360

# Angle between hands, don't care about the direction

difference = abs(hour_hand_angle - minute_hand_angle)

# If angle is larger than 180 degrees, take the opposite angle since it measures smaller

difference %= 180

return difference

Seems accurate, but I haven't done any kind of testing- just wrote this as I thought through the problem.
The third question is quite a tricky one. there are 30 degrees between hours, and you can see that there are 3 hour gaps, so that is 90 degrees to start off with. For the minute hand, you know that minute hands traverse an hour hand every five minutes, so the minute hand is 1 minute and 26 seconds in, so you display that as a fraction and multiply it by 6 because a minute hand traverses 6 degrees every minute. that gives you 7.8 degrees. For the hour hand, you represent the time traveled as a fraction, and then divide by 60 because thats what my teacher told me to do, and then multiply by 30 to get the degrees, then subtract that by 30 because you want the other side of the hour. add everything up and you get 114.65 degrees.

Register to Join the Conversation

Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

»

Go to Registration page

You **cannot** post new topics in this forum

You **cannot** reply to topics in this forum

You **cannot** edit your posts in this forum

You **cannot** delete your posts in this forum

You **cannot** vote in polls in this forum