0

Please can anyone check what is wrong with my code

data = [ [23, 11, 5, 14], [8, 32, 20, 5] ] sum=23+11+5+14+8+32+20+5 color = input() br=(int((data[0][0]+data[1][0])) x =(int((data[0][1]+data[1][1])) gr=(int((data[0][2]+ data[1][3])) bl=(int((data[0][3]+ data[1][3])) if color=="brown": print(br*100/sum) elif color=="blue": print(x*100/sum) elif color=="green": print(gr*100/sum) elif color=="black": print(bl*100/sum)

21st Jul 2022, 6:09 AM
Mobola Adeayo Godwin
4 Réponses
+ 1
Thank you
21st Jul 2022, 6:23 AM
Mobola Adeayo Godwin
21st Jul 2022, 6:48 AM
Oma Falk
Oma Falk - avatar
0
Missing closing ( ) for all variable declarations.
21st Jul 2022, 6:16 AM
Felix Alcor
Felix Alcor - avatar
0
I wrote it but it but it output invalid syntax
21st Jul 2022, 6:29 AM
Mobola Adeayo Godwin