← Quiz: File Organization and Hashing: all 9 questions
Quiz: File Organization and Hashing · Question 7 of 9
What does this print? (code)
What does this print?
gd = 2
for key in [6, 13, 20]:
print(format(key % 2 ** gd, f'0{gd}b'), end=' ')
- A.01 10 00
- B.10 01 00
- C.11 01 10
- D.10 11 00
Answer & explanation
Correct answer: 10 01 00
The last two bits: 6 = 110 → 10, 13 = 1101 → 01, 20 = 10100 → 00.
Can you get the rest right without peeking?
Take the timed Quiz: File Organization and Hashing quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →