Assignment3-Python if Else Practice Questions (1)
Assignment3-Python if Else Practice Questions (1)
3. Membership Discount
Check if the customer is a member (is_member = True). Members get a 20% discount;
non-members get a 5% discount. Calculate and print the discounted price.
4. Seasonal Sale
If today is a holiday (is_holiday = True), apply a 25% discount; otherwise, apply a 10%
discount. Calculate the price after discount.
5. Buy-One-Get-One-Free
If a customer buys an even number of items, they get half of them for free. Otherwise,
they pay for all. Calculate the number of items the customer has to pay for.
B- Tax Calculations
6. Sales Tax
If the price of an item is greater than $500, apply a luxury tax of 15%. Otherwise, apply a
standard tax of 8%. Display the total price after tax.
7. Income Tax
If a person's annual income is above $50,000, they pay 20% tax. Otherwise, they pay
10%. Calculate and display the tax amount.
8. Tax Bracket
Write a program to categorize a person into tax brackets:
Income < $30,000: "Low Tax"
$30,000 ≤ Income < $100,000: "Medium Tax"
Income ≥ $100,000: "High Tax"
9. VAT Calculation
If the item is marked as essential (is_essential = True), apply a VAT of 5%. Otherwise,
apply a VAT of 12%. Display the final price.