Bakery Sales

Bakery Sales

A bakery sells wholemeal breads, sweets and cakes. To encourage sales, the director announced prizes based on the number of products sold during the week, following a point system: each loaf of bread (b) is worth 1 point, each sweets pack (s) is worth 2 points and each cake (c) is worth 3 points. Depending on the total points accumulated, employees may receive a different reward. The challenge is to create a program that determines which award employees will receive based on the quantity of each product sold.

If the sum of the points of all products sold in the week is equal to or greater than 150, each employee receives a cake ("C") as a prize; otherwise, if the sum of the points is greater than or equal to 120, each employee receives a sweets pack ("S") as a prize; otherwise, if the sum of the points is greater than or equal to 100, each employee receives a loaf of bread ("B") as a prize. If the sum of the points is less than 100, there is no award ("N") for the employees.

example

The challenge is to create a program that determines which award employees will receive based on the quantity of each product sold.

Input: Three integers (int) representing, respectively, the number of breads, sweets packs and cakes sold in the week.

Output: String (str) containing a character representing the prize.

Examples:

assert bakery_sales(100, 10, 4) == "S"
assert bakery_sales(30, 45, 10) == "C"
assert bakery_sales(3, 10, 5) == "N"
assert bakery_sales(100, 0, 0) == "B"