Skip to content
Sharp

Python Fundamentals · interview question

Which naming or modeling choice is strongest for f-strings and output formatting?

Multiple choiceMediumchapter-1-curatedpremiumpython-fundamentalsf-strings-and-output-formatting
python
subtotal = 119.97
shipping = 0
print(f"Subtotal: {subtotal:.2f} | shipping: {shipping:.2f}")
Choose one answer
Answer and explanation

Correct answer

D. Use names and structures that describe the business fact directly instead of temporary implementation noise.

Why

Clear naming and modeling shorten debugging, review, and onboarding time.

Test yourself on Python Fundamentals

A free test with instant, explained results. No account needed.

Start free test
All Python Fundamentals questions →