Computer Science, asked by adithyan8496, 12 hours ago

I hav to xplain this in my next classs, pleas help, i just know how answer is (2,4,6,8,10)but dont know to xplain this​

Attachments:

Answers

Answered by EmperorSoul
0

25 is the output.

Explanation:

list = [1,2,3,4,5,6,7,8,9,10] is a list that consists 1 to 10 numbers within it.

list[::2] takes out the list of values with an slice difference of 2 between successors, starting from index 0, then 0+2 = 2, 2+2=4 and so on. So, it results list[::2] = [1, 3, 5, 7, 9]

sum(list[::2]) sums the elements present in the sliced list, i.e., sum( [1, 3, 5, 7, 9] ) = 25 and it is stored into variable l.

So, on printing the variable l using print(l), we get 25 as output.

Learn more:

1) Printing all the palindromes formed by a palindrome word.

brainly.in/question/19151384

2) Indentation is must in python. Know more about it at :

brainly.in/question/17731168

Answered by itzmecutejennei
1

Answer:

answer is (2,4,6,8,10)

A Series is a one-dimensional array containing a sequence of values of any data type (int, float, list, string, etc) which by default have numeric data labels (called index) starting from zero. Example of a series containing names of students is given below:

Index Value

Similar questions