Skip to content
Exercise · Q6

Q.Write the pseudocode to print the bill depending upon the price and quantity of an item. Also print Bill GST, which is the bill after adding 5% of tax in the total bill.

CBSENCERTSubjective· 3mImportance★★★★★est
67% · 24/36 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Bill = price × quantity; Bill GST = bill + 5% of bill — two inputs, two computed outputs.

The idea. This is a straight input–process–output computation with a percentage step. The tax is 5% of the bill, i.e. (5/100) * bill, added on top of the bill. Writing the two amounts as separate variables (bill, billGST) keeps both available for printing.

Pseudocode

PRINT_BILL_WITH_GST
Step 1: INPUT price
Step 2: INPUT quantity
Step 3: COMPUTE bill = price * quantity
Step 4: COMPUTE billGST = bill + (5 / 100) * bill
Step 5: PRINT "Bill amount =", bill
Step 6: PRINT "Bill with GST =", billGST
END

(Equivalently, billGST = bill * 1.05.)

Python verification

price = float(input("Enter price of the item: "))
quantity = int(input("Enter quantity: "))
bill = price * quantity
billGST = bill + (5 / 100) * bill
print("Bill amount =", bill)
print("Bill with GST =", billGST)

Sample run

Enter price of the item: 200
Enter quantity: 3
Bill amount = 600.0
Bill with GST = 630.0
``` …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.