🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Memory Hierarchy and Cache: all 10 questions

Quiz: Memory Hierarchy and Cache · Question 9 of 10

What does this print? (code)

What does this print?

def amat(hit_time, miss_rate, miss_penalty):
    return hit_time + miss_rate * miss_penalty

print(amat(2, 0.1, 50))
  1. A.5.0
  2. B.52.0
  3. C.7.0
  4. D.2.5
Answer & explanation

Correct answer: 7.0

AMAT = 2 + 0.1 × 50 = 7 ns.

Can you get the rest right without peeking?

Take the timed Quiz: Memory Hierarchy and Cache quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →