Skip to content

Instantly share code, notes, and snippets.

@ddaws
ddaws / hour_overlap.py
Last active October 22, 2016 00:57 — forked from BeOleg/hour_overlap.py
Oleg's Challenge
# 1. Create a Python function that gets an integer between 1 - 12 (as an hour) and returns the exact time in hours
# and minutes at which the hands of the clock overlap at this hour
# (for example, for 1, the result will be close to 1:06)
# 2. create a unit test for this function, using 'assert', or the Python 'unittest' framework
# 3. [BONUS]
# a. add also seconds calculation to the return value of the function.
# b. calculate the angle of the hands in 360 degrees system
# taking 12:00 (noon, midnight) as a point of reference
# ATTENTION: You do not need to import any modules to implement this task