← 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))
- A.18.0
- B.180.0
- C.1.8
- 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 →