+ 1
The question is that the solution resulting in float rather than integers.
data = [ [23, 11, 5, 14], [8, 32, 20, 5] ] color = input() #your code goes here total= 23+11+5+14+8+32+20+5 if color=="brown" or color=="blue" or color=="green" or color=="black": print(int((data[0][0]+data[1][0]))*100/total)
3 Respuestas
+ 5
Haris ,
there are issues that need your attention. please have look in the attached file with your code, and also some comments and hints.
> it is recommended to read the task carefully.
https://code.sololearn.com/cbWT0f5dbj5L/?ref=app
+ 2
thank you for that..
But in this case my code works like this.. and only single case is solved!
data = [
[23, 11, 5, 14],
[8, 32, 20, 5]
]
color = input()
#your code goes here
total=23+11+5+14+8+32+20+5
if color=="brown" or color=="blue" or color=="green" or color=="black":
a = (data[0][0]+data[1][0]) * 100 / total
print(int(a))
# end