← Quiz: Disk Scheduling Numericals: all 10 questions
Quiz: Disk Scheduling Numericals · Question 7 of 10
What does this print? (code)
What does this print?
path = [50, 82, 140, 170, 190, 16, 24, 43]
print(sum(abs(b - a) for a, b in zip(path, path[1:])))
- A.167
- B.314
- C.341
- D.391
Answer & explanation
Correct answer: 341
This is the C-LOOK path including the jump from 190 to 16.
Can you get the rest right without peeking?
Take the timed Quiz: Disk Scheduling Numericals quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →