0
Plz Explain the code..
i=2 while i<=19: print(i+5) I*=7
6 Respuestas
+ 3
Arvind Kumar I see you have completed the Python course. What part of the code don't you understand?
+ 3
It's a while loop, which will work until the condition is true. So here:
2 <= 19 returns true and print 2 + 5 = 7
now i *= 7, i = i * 7 = 2 * 7 = 14
again 14 <= 19 is true and print 14 + 5 = 19
now i *= 7, i = i * 7 = 14 * 7 = 98
now 98 <= 19 is false, so it will stop here.
finally output will be 7, 19
+ 3
Arvind Kumar I found that too, so after I finished the course, I started over at the beginning of the lessons and worked my way through them slowly and practiced writing my own codes for each new concept. I used Google a lot. As it helped to see each new concept from several different viewpoints, I looked them up in tutorials like https://www.programiz.com/JUMP_LINK__&&__python__&&__JUMP_LINK-programming
https://www.learnpython.org and
https://docs.python.org/3.8/tutorial/
It was a slower process but it was worth it because the knowledge stuck better. 🙂
+ 2
Use indentation properly
+ 2
David Ashton sir🙏🏻
yeah I have completed the Python course.but whenever I go for revision and challenge someone I face this kind of random doubts.