#Declared variable
package_price = 99
# Prompt user for quantity
quantity = int(input("Enter the number of packages purchased: "))
if quantity >= 100:
discount_rate = 0.50
elif quantity >= 50:
discount_rate = 0.40
elif quantity >= 20:
discount_rate = 0.30
elif quantity >= 10:
discount_rate = 0.20
else:
discount_rate = 0.0
# Calcuate totals
subtotal = quantity * package_price
discount_amount = subtotal * discount_rate
total = subtotal - discount_amount
# Display results
print(f"\nDiscount: ${discount_amount:.2f}")
print(f"\nTotal cost after discount: ${total:.2f}")