+ 2

P

List [1,2,3,4] If _____(list )%2==0 Print (list )[ ]

21st Aug 2022, 8:38 PM
Amelia
Amelia - avatar
15 Réponses
+ 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.
22nd Aug 2022, 5:59 AM
Oma Falk
Oma Falk - avatar
+ 3
Incomplete question...
21st Aug 2022, 8:44 PM
Jayakrishna 🇮🇳
+ 3
You put your question where the you put P. And then you give supporting info in the description.
21st Aug 2022, 11:17 PM
Chris Coder
Chris Coder - avatar
+ 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
22nd Aug 2022, 6:05 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
Sorry the (p) i just put it there cause i don't know what to put there
21st Aug 2022, 8:53 PM
Amelia
Amelia - avatar
+ 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?
21st Aug 2022, 9:04 PM
Jayakrishna 🇮🇳
+ 2
Nifemi Omidiran what do you think should be there? what are your thoughts?
22nd Aug 2022, 5:39 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
Oma Falk typo in the text. square brackets must be inside ()
22nd Aug 2022, 6:07 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 2
Well i forgot that sorry
22nd Aug 2022, 10:11 PM
Amelia
Amelia - avatar
+ 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
22nd Aug 2022, 10:14 PM
Amelia
Amelia - avatar
+ 2
Oma Falk it is the module quiz
22nd Aug 2022, 10:16 PM
Amelia
Amelia - avatar
+ 2
Thank you jayakrishna it worked. Thank you so much ☺☺☺
23rd Aug 2022, 12:02 PM
Amelia
Amelia - avatar
+ 1
Yaroslav Vernigora yes...didn't remember exactly that lesson. I will edit my answer.
22nd Aug 2022, 6:12 AM
Oma Falk
Oma Falk - avatar
0
Nifemi Omidiran we have already understood this. now you are expected to step forward and your assumption, what could be there?
23rd Aug 2022, 1:55 AM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
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..
23rd Aug 2022, 8:47 AM
Jayakrishna 🇮🇳