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 line.
5. You must count the number of solutions found and print that count.
6. If no solutions are found, you must print a message to that effect.
You can place an order similar to this with us. You are assured of an authentic custom paper delivered within the given deadline besides our 24/7 customer support all through.
Latest completed orders:
# | topic title | discipline | academic level | pages | delivered |
---|---|---|---|---|---|
6
|
Writer's choice
|
Business
|
University
|
2
|
1 hour 32 min
|
7
|
Wise Approach to
|
Philosophy
|
College
|
2
|
2 hours 19 min
|
8
|
1980's and 1990
|
History
|
College
|
3
|
2 hours 20 min
|
9
|
pick the best topic
|
Finance
|
School
|
2
|
2 hours 27 min
|
10
|
finance for leisure
|
Finance
|
University
|
12
|
2 hours 36 min
|