Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

3. Existing organizations and programs constrain behavior.

Answered: 1 week ago