0

Please help me solve this question by checking what's wrong with my code

Your favorite store is having a sale! You pay full price for the most expensive item that you get, but then you get 30% off of everything else in your purchase! How much are you going to save? Sales tax is 7%. Also, you leave anything below a dollar in your saving as a tip to the seller. If your saving is a round amount, you don't leave any tips. Task: Given the prices of items you want to purchase, determine how much you will save during your shopping! Input Format: An string of numbers separated by commas that represent the prices for all of the items that you want to purchase (without tax). Output Format: An integer number that represents the total savings that you got for shopping during the sale. Sample Input: 100.25,80.99,40.00 Sample Output: 38 Explanation: With the sale, you would get 30% off of the second two items. The amount you save is $36.297, and $38.83779 when you consider the 7% tax. After leaving the 0.83779 as a tip, your final saving is $38. https://code.sol

23rd Jun 2021, 10:56 AM
Bitu Kumar Sha
Bitu Kumar Sha - avatar
2 Answers
0
https://code.sololearn.com/c6JljEYBL4VQ/?ref=app
23rd Jun 2021, 1:13 PM
Bitu Kumar Sha
Bitu Kumar Sha - avatar
0
your code does not convert input (string) to number... so max() function doesn't work as expected ^^ replace your first line by: price = [float(v) for v in input().split(",")] (no need to specify the 'sep' name argument as it is the first argument expected ;))
23rd Jun 2021, 11:42 PM
visph
visph - avatar