Tutorial2 - Input N Output - 230419 - 072628

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

STIV1013

Programming Language and Authoring


16/4/2023

TUTORIAL 2 – INPUT & OUTPUT


Instruction:
1. Write python codes in to solve the given problem
2. Save the codes in a python file (.py) named Tutorial 2 with your name and matric number.
Example:
Tutorial2_Nizam_222333.py
3. Upload the python file into UUM OL

Problem:

ABC Sdn. Bhd. is a sport apparel shop located in Jitra, Kedah. Currently, the have
lunched bonanza sales called “Jom Raya with us” starting from middle of March until
the end of April. In that sales, three items are offered with exciting discount to attract
potential customers spending their money at the shop. The first item is sport shoes
where the shop will offer discount between 10-15% for each item bought. The second
item in the discount list are track bottoms. Customers are eligible to be offered with
special discount between 20-25% on any well-known sport brand. Meanwhile the
third item to be offered with discount are t-shirts. Customers can choose more that
10 different t-shirt brands and they can get discount between 15-18%. Since the
company is having problem to calculate all items bought manually, they have decided
to hire you to provide solutions via phyton codes. Here are the requirements for the
solution:
1. Your solution must enable cashier to enter all items that currently offered with
discount.
2. Cashier must insert the price for selected item and the discount rate one by one.
3. The solution must calculate the discount based on the price then display the
amount of discount for each item.
4. Then, print the new price for each item after discount (actual price subtract
discount)
5. At the end, display the total new price that the customer need to pay.

You might also like