Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Control Flow

if / else

  • Tundra supports regular if/else statements like python.
  • The condition must be wrapped around parenthesis
if (condition):
    # true branch
    print("Yes")
else:
    # false branch
    print("No")

while

  • Tundra supports regular while statements like python.
  • The condition must be wrapped around parenthesis
var i = 0
while (i < 5):
    print(i)
    i = i + 1

for over range()

  • Tundra supports regular for statements like python.
for i in range(3):
    print(i)

break and continue

    • Tundra supports regular break and continue statements like python.
for i in range(10):
    if (i == 3):
        break
    if (i % 2 == 0):
        continue
    print(i)