0
Python - need help please!
in functions and modules - final quizz - final question, can you tell me why the hell is answer 6?
1 Answer
0
look it is easy: 'res' is equal to 0 then you enter the loop:
0 + 1 = 1
1 + 2 = 3
3 + 3 = 6
And here you are ! res = 6
'i' doesn't take the value 4 because 'range' is exclusive