+ 1
What are the many ways of using loops in python code?
I needed to print 'We love Python turtles!' a 100 times an list all the months. code: One of the months of the year is January One of the months of the year is February ... Use a list to print all 12 months. I just need explanations how to use loops. I researched about it but none of it made any sense. So I was hoping someone could explain to me in depth.
6 Réponses
+ 2
Kittyky.n This is the 3rd question that you made (and i parteciped) and you ask only for a particular problem... Do you want know only loop? This is the SL python tutorial https://www.sololearn.com/Course/Python/?ref=app
Follow it and you will understand all basic python
+ 1
Your code?
+ 1
Kittyky.n But you use SL for get your assignements made by other users?
0
One of the months of the year is January
One of the months of the year is February
...
Use a list to print all 12 months.
0
for i in range(100):
print("Prints 100 times!")
months = [jan", "feb", "mar"]
for month in months:
print(month)
0
krOW I just wanted to know how to use loops.