Question: Q1 Write Python Program A grocery store by the university makes discounts to students. If the total purchase is more than 250 TL then the

Q1

Write Python Program

A grocery store by the university makes discounts to students. If the total purchase is more than 250 TL then the discount is 0.12 otherwise the discount is 0.10. After the discounted total is calculated 0.18 VAT is added to find the total amount to be paid by the student customer.

If the customer is a regular customer (i.e. not a student) then no discount is applied to the total purchase but 0.18 VAT is added to find the total to be paid by the regular customer.

Write a Python program to calculate the total amount to be paid by the customer.

The program must ask the user if the customer is a student or a regular customer then ask the user to enter the total purchase amount. Finally the program should do the calculations according to the customer type (student or regular customer) and display Total purchases and next to it the discount percentage and discount amount if there is any, Discounted total on the next line and Total on the last line.

Your program must perform this for more than one customers. In other words after the first customer the program must ask Do you want to continue? If the answer is Yes then the program must query the next customer otherwise the program must stop.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!