Need Guidance on Implementing Loops in Python

Hello there,

As I am new to programming and have recently been delving into Python. I’ve been exploring loops lately, but I’m encountering some challenges in understanding their implementation effectively. I’ve gone through tutorials and documentation, but I still feel a bit confused about how to use loops efficiently in my code.

Mainly I’m struggling with:

Choosing between for loops and while loops for different scenarios.
Understanding how to properly structure loops within functions.
Recognizing common pitfalls and best practices to avoid them.

https://docs.python.org/3/tutorial/controlflow.htmlinfo

I would greatly appreciate it if anyone could provide some guidance, resources, or even simple examples that could help clarify these concepts for me.

Also, if you have any suggestions on how to practice and reinforce loop-related skills effectively, I’d be eager to hear them.

Thank you in advance.

1 Like

Sorry, don’t know but you might want to join and then search/post about this to the Facebook group Computer Science Educators. I notice a lot of threads about python and coding.