[PyAR2] Programming Challenge III
gslindstrom at gmail.com
Mon Nov 17 16:58:44 CET 2008
Here's one I have not done before.
At work, we have door locks with 5 buttons, 1, 2, 3, 4 and 5. To open the
door you must press the buttons in the correct order. I would like to see a
program that will generate a random sequence for combinations (I believe my
mathematical friends would say permutations because order matters)
satisfying the following conditions:
All of the buttons must be pressed to open the door.
1 or 2 of the buttons may be pressed simultaneously (example: 1 and 3
together, then 2, then 4 and 5 together).
Extra credit: How many permutations are there using the above criteria?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyAR2