Question: What will be the output of the following Python code segment? L = [ 1 , - 2 , 4 , 3 , 2 ,

What will be the output of the following Python code
segment?
L =[1,-2,4,3,2,-7,11.2.8.-1) x =0
for i in range(len(L)): if (L(i]<0):
continue
if (L(i)>10):
break
x = x + L[i] print (x)
a.
0
b.
1
c.
10
d.
21

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!