1
What is the output of the following code?
total = 0
for x in [3, -1, 4, -5, 2]:
if x < 0:
continue
total += x
print(total)DiscussEasy
Loading subject content…
Loading practice questions…
What is the output of the following code?
total = 0
for x in [3, -1, 4, -5, 2]:
if x < 0:
continue
total += x
print(total)What is the output of the following code?
x = 15
if x > 10 and x % 5 == 0:
print('A')
elif x > 10:
print('B')
else:
print('C')What is the output of the following code?
total = 0
for i in range(5):
total += i
print(total)