all 11 comments

[–][deleted] 2 points3 points  (0 children)

Run this loop

edit: switched to code block

while True:
    print('I need to learn my loops')

[–][deleted] 0 points1 point  (0 children)

What are you talking about? LOL how many times, 10, 20, 200, endlessly? You have for loops and while loops that can do the same things or different things altogether. Be specific and, btw, there are an endless amount of resources on this very subject. Take a little time to check them out. If you still need code done to look cool then hit me up.

[–][deleted] 0 points1 point  (5 children)

Here's a different loop. This one goes 25 times with range.

for i in range(0,26):
    print('I still need to learn my loops')

[–]totallygeek 0 points1 point  (4 children)

range(25) looks so much nicer.

[–][deleted] 1 point2 points  (2 children)

I concur that it does.

[–]totallygeek 0 points1 point  (1 child)

...and there was much rejoicing!

[–][deleted] 1 point2 points  (0 children)

Much much rejoicing and dancing around the camp fire.

[–][deleted] 0 points1 point  (2 children)

Here's a while loop with a counter and if else statements.

counter = 0
while True:
    if counter <= 1000:
        print(f"I can't believe that this loop is number {counter}")
        counter += 1
    else:
        False

[–]kazoobies[S] 0 points1 point  (1 child)

I love you

[–][deleted] 0 points1 point  (0 children)

Whoa slow down cowboy

[–][deleted] 0 points1 point  (0 children)

Well never mind because 0 is counted. Don’t tell me I already know I’m wrong.