"""
Learning Goals:
 - Use while loops when reading and writing algorithms to repeat actions while a certain condition is met
 - Identify start values, continuing conditions, and update actions for loop control variables
 - Translate algorithms from control flow charts to Python code
 - Use nesting of statements to create complex control flow
"""

i = 0
while i < 5:
    i = i + 1
    print(i)

print("Done!")

###

num = 10
while num >= 1:
    print(num)
    num = num - 1

###

num = 1
result = 0
while num <= 10:
    result = result + num
    num = num + 1
print(result)

###

zombieCount = 1
population = 7.5 * 10**9
daysPassed = 0
while zombieCount < population:
    daysPassed = daysPassed + 1
    zombieCount = zombieCount * 2
print(daysPassed)

###

n = 673586754645879

digits = 0
while n > 0:
    n = n // 10
    digits = digits + 1
print(digits)

###

i = 0
while i < 500:
    if i % 2 == 0:
        print("x-x-x")
    else:
        print("-o-o-")
    i = i + 1
