🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← 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:])))
  1. A.167
  2. B.314
  3. C.341
  4. 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 →