Skip to content
Sharp

Automation Scripts · interview question

A bug appears around script entry points. What is the strongest first debugging move?

Multiple choiceMediumchapter-1-curatedpremiumautomation-scriptsscript-entry-points
python
def main() -> None:
    subtotal = 39.99 * 2
    print(f"Order summary ready: {subtotal:.2f}")


if __name__ == "__main__":
    main()
Choose one answer
Answer and explanation

Correct answer

D. Trace one concrete example, inspect the state transitions, and compare them to the intended rule before rewriting anything.

Why

That approach is reliable because it creates evidence. Dropping all logic at module level makes it awkward to test, reuse, or explain where the real workflow starts.

Test yourself on Automation Scripts

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

Start free test
All Automation Scripts questions →