Can someone help me answer question 4&5 in module 3's quiz | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Can someone help me answer question 4&5 in module 3's quiz

17th Aug 2016, 4:00 AM
Keyayco
Keyayco - avatar
2 Answers
+ 1
in question 4 the 'return' is inside the for so it breaks the code after one iteration 'i' will take values between 0 and 9 but the 'return' stops the code after 'i' has taken its first value
17th Aug 2016, 7:17 AM
Slake 95
Slake 95 - avatar
0
for question 5 the return is out of the for so it doesnt break the code immediately i will take values between 0 and 3 so res =0+0 thenrm res 0+1 then res= 1+2 then res= 3+3
17th Aug 2016, 7:19 AM
Slake 95
Slake 95 - avatar