0

Python, anyone wanna challenge this ?

How many items do you wish to record? 4 Item 1: Please enter the cost for this item: five Please enter a real number Please enter the cost for this item: 1.00 How many of this item were used? too many Please enter a non-negative integer How many of this item were used? -1 Please enter a non-negative integer How many of this item were used? 4 Is this item tax deductable (Yes,No)? y The options are Yes or No Is this item tax deductable (Yes,No)? not really The options are Yes or No Is this item tax deductible (Yes,No)? Yes Item 2: Please enter the cost for this item: 2 How many of this item were used? 2.45 Please enter a non-negative integer How many of this item were used? 5 Is this item tax deductible (Yes,No)? yes Item 3: Please enter the cost for this item: 3.45 How many of this item were used? 10000 Is this item tax deductible (Yes,No)? Yes Item 4: Please enter the cost for this item: 10.20 How many of this item were used? 3 Is this item tax deductible (Yes,No)? no Most expensive item: $34500.00 (item 3) Average cost per item: $8636.15 Total expenses: $34544.60 Total tax deductible: $34514.00

16th Aug 2018, 10:49 AM
ABC
ABC - avatar
4 ответов
0
I don't understand what your actual question is. Could you please provide a link to your Code Playground project and clarify what the desired behavior is?
16th Aug 2018, 2:41 PM
Janning⭐
Janning⭐ - avatar
0
there you go! @Janning
17th Aug 2018, 9:22 AM
ABC
ABC - avatar
0
Your program will need to ask how many items are going to be recorded, then it should ask for the cost and quantity of each item and whether or not it is tax deductible. The final output will display the most expensive item's cost and item number, the average cost per item, total expenses and total amount across all items that are tax deductible. Your program must ensure that both the number of different stationery items and number of individual equivalent items are non-negative integers. The cost per item should be entered as a decimal number (e.g. 5.05). If the user enters an invalid value for any of these inputs, you should prompt them to enter a valid value. The input for tax deductible status should be a string and should be case-insensitive.
17th Aug 2018, 9:27 AM
ABC
ABC - avatar
0
Hi ABC , Maybe there was a glitch of some sort when you posted, but I still don't see any links to your Code Playground project in this thread, or anything ending with a question mark to help elaborate on what your actual question is. (Clarification: I don't see any outstanding questions, since it seems like you answered them all, so it would be good to know what is left that you need help with.)
17th Aug 2018, 4:49 PM
Janning⭐
Janning⭐ - avatar