+ 2
P
List [1,2,3,4] If _____(list )%2==0 Print (list )[ ]
15 Respostas
+ 6
Nifemi Omidiran yeah...what to put where seems to be a prob for you.
edited:
I would guess, ou need a list function.
just go back to lesson before that task.
my feeling is, you move too fast through the lessons.
take your time and try yourself as the code snippets advice.
+ 3
Incomplete question...
+ 3
You put your question where the you put P. And then you give supporting info in the description.
+ 3
"fill in the gaps so that the program returns the first item in the list if the list contains an even number of items."
task for testing knowledge in the course python core 29.1
+ 2
Sorry the (p) i just put it there cause i don't know what to put there
+ 2
I mean, your code is also incomplete.. What is your expectation by that code?
Is you need to fill gaps? But for what the task? What you tried?
+ 2
Nifemi Omidiran what do you think should be there? what are your thoughts?
+ 2
Oma Falk typo in the text. square brackets must be inside ()
+ 2
Well i forgot that sorry
+ 2
The question says fill in the blanks to print the first element of the list, if it contains even number of elements .
Module quiz
+ 2
Oma Falk it is the module quiz
+ 2
Thank you jayakrishna it worked.
Thank you so much âșâșâș
+ 1
Yaroslav Vernigora yes...didn't remember exactly that lesson. I will edit my answer.
0
Nifemi Omidiran we have already understood this. now you are expected to step forward and your assumption, what could be there?
0
len() function returns length of iterable. Ex: len(list)
First element is at index 0 in any iterable. You can try yourself first now..