🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: DNS in Depth: all 10 questions

Quiz: DNS in Depth · Question 9 of 10

What does this print? (code)

What does this print?

def lookup_ms(cached_levels, rtt_client=10, rtt_server=40):
    return rtt_client + (3 - cached_levels) * rtt_server

print(lookup_ms(1) - lookup_ms(2))
  1. A.10
  2. B.40
  3. C.50
  4. D.90
Answer & explanation

Correct answer: 40

Each extra level the resolver must ask costs one resolver-to-server RTT of 40 ms.

Can you get the rest right without peeking?

Take the timed Quiz: DNS in Depth quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →