Can You help with this filling blank code? Filling blank to print the first element of the List if It contains even numero. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can You help with this filling blank code? Filling blank to print the first element of the List if It contains even numero.

List=[1,2,3,4] if __(list) et % 2==0__ print (list)[__]

12th May 2017, 5:09 AM
Giuseppe Reho
Giuseppe Reho - avatar
1 Answer
+ 2
you need to get the length of the list. it its then checked to see if 2 can be divided with no remainder. punctuate the 2nd line. Then which item in the list you want. remember list positions don't start with number 1. hope that was more hint than answer. Good luck.
15th May 2017, 3:23 AM
Marcus C
Marcus C - avatar