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?

26th May 2020, 3:17 PM
Naehyun(Ray) Park
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:-)
26th May 2020, 3:21 PM
Abhay
Abhay - avatar
0
for i in range(0, 20, 2): print(i)
22nd Aug 2020, 4:57 AM
thida soe
thida soe - avatar
0
print(i)
19th Aug 2021, 3:19 PM
Olayiwola Bamitale
0
What is the output of this code? list = [1, 1, 2, 3, 5, 8, 13] print(list[list[4]])
18th Oct 2022, 6:25 AM
Marina280367
Marina280367 - avatar