0
What is the answer of this question and why this is the answer?
Fill in the blanks to create a for loop that prints only the even values in the range: for i in range(0, 20, 2): print( ) what is the answer in the print bracket? and please explain why answer that you answered is a right answer?
4 Respostas
+ 2
It should be print(i) ,now I don't have any explanation for that because that's how for loop works, i is assigned the value from range(0,20,2)
range(start,end,steps)
so it's like 0,2,4,6,8 and they get printed
also you should go through python course again:-)
0
for i in range(0, 20, 2):
print(i)
0
print(i)
0
What is the output of this code?
list = [1, 1, 2, 3, 5, 8, 13]
print(list[list[4]])