Skip to content

Loops #5

@SK1Y101

Description

@SK1Y101

Som syntax ideas for loops:

For loops

Python:

for x in range(10):
    print(x)

This language:

Start a counter at zero, and repeat the following ten times:
    show the counter

While

Python:

while true:
    print(“loops up”)

This language:

repeat the following forever:
    Show loops up

break

Python:

while true:
  if x == true:
    break

This language:

repeat the following forever:
    if the value of x is true, then:
        stop the loop

Not sure whether any of these are readable, but that’s for discussion to decide right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions