Question 4: Project

Bella owns a bookstore and wants to create a program to help customers calculate the total cost of their book purchases. She wants to implement some unique pricing rules to encourage customers to buy more. Write a Python program to assist Bella with her calculations.

Here are the pricing rules for Bella’s bookstore:

  • Hardcover Books: Customers can purchase hardcover books for $20 each.
  • Paperback Books: Customers can purchase paperback books for $10 each.
  • Special Offer: If customers buy more than 5 books in total, they receive a 10% discount on their entire purchase.

Write a Python program that prompts customers to select the quantity of hardcover and paperback books they want to purchase, calculates the total cost, and applies any applicable discounts.

Write what you are looking for, and press enter to begin your search!