In what concerns the continuous evaluation solving exercises grade during the semester, you should submit until 23:59 of October 26th
(this exercise will still be available for submission after that deadline, but without couting towards your grade)
[to understand the context of this problem, you should read the class #03 exercise sheet]


[IP015] Buy Me Flowers

Sam Blossom sells flowers to other stores (F) and to individual customers (P). For stores, they offer a discount plus tax exemption, but individual customers pay a 6% tax (and have no discounts).

The Problem

Write a program that calculates the final price of flowers based on the customer's type and the initial price. Note that:

Amount (Euros) Discount (%)
Lower than 50 2
Between 50 and 200 5
Over 200 10

Input

The input consists of two lines:

Output

The output should be a single line displaying the customer's type and the final price after applying the relevant discount or tax, rounded to three decimal places, formatted as follows:

Customer: [customer_type] | Price: [final_price]

Note that when the default behavior of Python's print is to ignore zeros on the far right of the decimal part (e.g. 37.100 is printed as 37.1). This is ok and you should just print the answer rounded to three decimal places and let Python print the obtained number as in the examples).

Constraints

The following limits are guaranteed in all the test cases that will be given to your program:

Customer: "F" or "P"       Valid Customer Types
0 < price ≤ 500       Price of the flowers

It is also guaranteed that the customer type is given as a single letter, either "F" or "P".

Example Input 1 Example Output 1
35
P
Customer: P | Price: 37.1

Example Input 2 Example Output 2
235
F
Customer: F | Price: 211.5

Introduction to Programming (CC1024)
DCC/FCUP - University of Porto