Need Help ?
Have a Question ?

(Solved): Problem Statement (IN PYTHON Use Of Conditions, Loops, And Functions As Taught. First Things Declare ...

Problem Statement (IN PYTHON Use of conditions, loops, and functions as taught. First things declare function, main routine u

Problem Statement (IN PYTHON Use of conditions, loops, and functions as taught. First things declare function, main routine use loop) You have been asked to write a program for a retail store that will allow them to calculate discounts for their employees when they buy items. Discounts are based on number of years worked as well as if the employee is a manager or hourly employee. They are also allowed no discount once they have received $200 in discounts for the year. Note: Once you complete the discount for the employee, a question should be asked as to if there is another employee. If there is, collect the input and process the data for the next employee as such. Do this until the user answers "NO" for "Another Employee". Once all employees have been processed, display the All Employee Summary and end the program. INPUT The application must be able to collect the following required information for each employee: 1. Number of years employed (required, numeric, >0) 2. Total amount of previous purchases before discount (required, numeric, >=0) 3. Employee status (employee or manager) 4. Total of today's purchase (required, numeric, >=0) OUTPUT There are two distinct areas required for output: 1. For each employee display the following: a. Employee discount percentage b. YTD Amount of discount in dollars c. Total purchase today before discount d. Employee discount this purchase e. Total with discount 2. (All Employee Summary) Calculate the total for all employees for today's date: a. Total before discount for the day b. Total after discounts applied PROCESS Employes discount standard Years of Employment Management Hourly 1-3 Years 20% 10% 4-6 Years 24% 14% 7-10 Years 30% 20% 11-15 Years 35% 25% More than 15 Years 40% 30% YTD discount in dollars = total purchase before today * discount Employes discount this purchase: The discount for the purchased is based on the YTD discounts already realized. Meaning, an employee or manager only receives $200 in discount for the year. Therefore: • If an employee has already accumulated $200 in discounts prior to the current purchase...then no discount for this purchase. . If the Total of the YTD Discount + Current Discount) <200 then the current purchase receives the whole discount. • If the (Total of the YTD Discount + Current Discount) > 200_then the current purchase receives the only a partial discount up to the 200 dollar YTD max. Total with discount: Total - discount allowed

Expert Answer


Output: Code: def empDiscount(years, status): if(years<=3): return 20 if(status=='m') else 10 if(years<=6): return 24 if(status=='m') else 14 if(years<=10): return 30 if(status=='m') else 20 if(years<
We have an Answer from Expert Buy This Answer $6