+ 1
How do I use a python for loop to simply do something a few times?
Sorry if the question sounds stupid but I'm having a frustratingly hard time trying to figure this out.
3 Réponses
+ 3
Hi Cameron Welker
If you want to do something, say, print "Hello!" five times, just do this:
for i in range(5):
print("Hello!")
+ 3
You're welcome, Cameron Welker
And I know it can look difficult sometimes, but please don't get discouraged. Keep practicing, and if you ever need help, ask us here. We believe in you ❤
+ 2
Ok wow, all the answers I found on google were overcomplicating it, thanks for the quick answer!