New course! Every coder should learn Generative AI!
Try a free lesson+ 2
Please try yourself
The quiz are to enhance your understanding, and being able to solve them by yourself is necessary for you to understand the next concepts.
If one question is too hard, look at the page before it. Click Try It Yourself and make changes and see what happens to output to understand.
Don't give up.
0
You can try this:
https://code.sololearn.com/cnzzsxROL0tc/?ref=app
0
https://www.sololearn.com/Discuss/2726770/?ref=app
https://www.sololearn.com/Discuss/2726783/?ref=app
https://www.sololearn.com/Discuss/2726795/?ref=app
0
Check out my code again, I put some comments, so I hope now it's better to understand.
- 1
You can use this
To get sum of first five
n = 5 + 1
print(sum(range(1, n)))