What's the issue in my code? Only one test case is getting output and the rest are not | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What's the issue in my code? Only one test case is getting output and the rest are not

data= { "100-90": 25, "42-01": 48, "55-09": 12, "128-64": 71, "002-22": 18, "321-54": 19, "097-32": 33, "065-135": 64, "99-043": 80, "111-99": 11, "123-019": 5, "109-890": 72, "132-123": 27, "32-908": 27, "008-09": 25, "055-967": 35, "897-99": 44, "890-98": 56, "344-32": 65, "43-955": 59, "001-233": 9, "089-111": 15, "090-090": 17, "56-777": 23, "44-909": 27, "13-111": 21, "87-432": 15, "87-433": 14, "87-434": 23, "87-435": 11, "87-436": 12, "87-437": 16, "94-121": 15, "94-122": 35, "80-089": 10, "87-456": 8, "87-430": 4 } org = 0 for var in data.values() : if var<18: org += 5 else: org += 20 age = int(input("")) new_total = 0 for var in data.values(): if var<age: new_total += 5 else: new_total +=20 x = (new_total - org)/org * 100 print (int(x))

12th Apr 2021, 11:18 AM
Khushboo Golampalle
Khushboo Golampalle - avatar
1 Answer
0
Whats the point of the code? Like what is it supposed do?
12th Apr 2021, 11:39 AM
Slick
Slick - avatar