1from secret import clue
2
3
4def lucky():
5 first_three_bits = clue(right_shift=5)
6
7 next_eight_bits = clue(left_shift=6)
8
9 middle_bits = clue(bw_and=8)
10
11 other_bits = clue(bw_or=223)
12
13 address = (first_three_bits << 11) | (next_eight_bits << 3) | middle_bits | other_bits
14
15 return address
F
======================================================================
FAIL: test_lucky (test.TestLucky.test_lucky)
Test with various cases.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test.py", line 29, in test_lucky
self.separate_test(0)
File "/tmp/test.py", line 24, in separate_test
self.assertEqual(solution.lucky(), value)
AssertionError: 223 != 0
----------------------------------------------------------------------
Ran 1 test in 0.002s
FAILED (failures=1)