livepython.net

46. Python Program to Calculate a Bill with Clear Comments

EasyGood comments

Overview

Clear names first, then a comment only where it explains why.

Problem Statement

A book costs 120 and Sunny buys 2. Delivery adds 30 to every order. Use clear variable names, add one comment explaining the delivery charge, and print:

Total: 270

Input

No input is required for this question.

Output

Total: 270

Learn this firstChapter 6 · How to Write Good Comments in Python
solution.py
# write your code here

EXPECTED OUTPUT

1Total: 270

YOUR OUTPUT

Press Run to see your output here. Lines are compared with the expected output.