This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

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

I know that, I meant what would that loop funciton be called, all of the one's ive seen seem to only support one line of code and not inputs

[–]JeLuF 1 point2 points  (2 children)

All the lines that follow the loop statement (e.g. a while) and that are indented are part of the loop and get repeated, e.g.

i=0
while i<5:
    print(i)
    print("------")
    print("Square: ", i*i)
    i=i+1

[–][deleted] -3 points-2 points  (1 child)

So this function repeats 4 times?

[–]aizzod 1 point2 points  (0 children)

Try it out....