+1(316)4441378

+44-141-628-6690


Warning: Use of undefined constant woothemes - assumed 'woothemes' (this will throw an Error in a future version of PHP) in /home/admin/web/qualityessayresearch.com/public_html/wp-content/themes/cushy/archive.php on line 47
Archive for the ‘Computer Scicence, python’
Warning: Use of undefined constant woothemes - assumed 'woothemes' (this will throw an Error in a future version of PHP) in /home/admin/web/qualityessayresearch.com/public_html/wp-content/themes/cushy/archive.php on line 47
Category

Python Assignment #1 Combination Lock Puzzle

You must provide the clues on the command line and they must be of the form XYZ-R-W where:
XYZ = a possible combination of 3 digits, each 0-9
R = count of wheels that are the right digit in the right place (0-3)
W = count of wheels that are the right digit but in the wrong place (0-3)
The expectation is that you will use a brute form technique to solve this puzzle. Iterate through all 1,000 possible combinations and see which one(s) pass all the clues. Do NOT try to solve this puzzle the way a human would, using logic.
Additional rules:
1.    The number of clues can vary. If no clues are given you must print an error
        message.
2.    You must use a regular expression to validate the XYZ-R-W syntax.
3.    You do not need to do any additional validation of the XYZ, R, W
        parameters.
4.    You must print the list of clues given, all on one l