+ 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.

6th Jan 2019, 8:59 AM
Cameron Welker
3 ответов
+ 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!")
6th Jan 2019, 9:01 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 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 ❤
6th Jan 2019, 9:03 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 2
Ok wow, all the answers I found on google were overcomplicating it, thanks for the quick answer!
6th Jan 2019, 9:02 AM
Cameron Welker