# 027: While Loops
# Repeat while condition is true

# Count up
count = 1

while count <= 5:
  show "Count: {count}"
  count = count + 1

# Wait for condition
password_attempts = 0
max_attempts = 3

while password_attempts < max_attempts:
  # In real code, get user input here
  password_attempts = password_attempts + 1
  show "Attempt {password_attempts}"

# While with complex condition
balance = 100
price = 15

while balance >= price:
  show "Purchase made, balance: {balance}"
  balance = balance - price
