Is there anything wrong w/ my code bit? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is there anything wrong w/ my code bit?

Just asking if there's anything that can be fixed/improved upon in my recent code bit - every "bit" helps. https://code.sololearn.com/cqMf2g23C4e1/?ref=app

20th Jan 2022, 10:47 PM
Conor Climo
Conor Climo - avatar
3 Answers
+ 2
I get a zero division error when any other color than the ones included is used as input. You might try and make a default case
20th Jan 2022, 10:56 PM
Slick
Slick - avatar
+ 2
I can't understand what's the code objective. Anyway, you can change the list and the nested list for a dictionary.
20th Jan 2022, 10:58 PM
Emerson Prado
Emerson Prado - avatar