Sunday, June 6th, 2010
For a given time, what will be the angle between the hour and minute hands on a clock?
[ddet Answer]
This is rather a long winded way of solving this, so please let me know if you have something shorter.
The angle of the minute hand (from 12 O'clock):
= (minutes / 60) ...
Posted in puzzles | No Comments »
Friday, June 4th, 2010
Write a Python function to find all the anagrams for each of a supplied list of words. For the word dictionary to find the anagrams you could use the one found on Unix or OS X boxes at /usr/share/dict/words. So for example:
>>> for group in anagrams(['dog','cat','horse']):
... ...
Posted in programming | 2 Comments »