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

Quiz: Production and Cost · Question 6 of 10

What does this print? (code)

What does this print?

PRICE_IN, PRICE_OUT = 4.00, 20.00        # USD per million tokens
per_request = (2_000 * PRICE_IN + 500 * PRICE_OUT) / 1e6
print(round(per_request * 10_000, 2))
  1. A.18.0
  2. B.180.0
  3. C.1.8
  4. D.1800.0
Answer & explanation

Correct answer: 180.0

Each request costs 0.008 + 0.01 = 0.018 dollars; 10,000 requests cost 180 dollars.

Can you get the rest right without peeking?

Take the timed Quiz: Production and Cost quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →