Lambdas challenge "How much?" in python
"How Much? Fix the code to output the percentage of the price. You are given code that should calculate the corresponding percentage of a price. Somebody wrote a lambda function to accomplish that, however the lambda is wrong. Fix the code to output the given percentage of the price. Sample Input: 50 10 Sample Output: 5.0" here is what I have: /// price = int(input(" ")) perc = int(input(" ")) res = (lambda x,y: y * (x/100))(price, perc) round(res, 2) print(res) /// I can get all the cases correctly except for test case 4. Test case 4 is locked. When I use print("%.1f" % res) to round the decimal point to 1, test case 4 is correct, but test case 1 is then incorrect, since it rounds 53.76 to 53.8, now giving the incorrect output. Anyone here know how to fix the issue where it seems one answer needs two decimal places and another needs one? Thanks in advance, looking forward to figuring this out!