Conditional Loops

Conditional loops will keep repeating until a condition is met.

The condition can be checked at the start of the the loop:

#
age = 0 #anything except -1
while age != -1:
    age = int(input('Enter age, -1 to finish:'))
    days = round(age * 365.25)
    print(f'You are over {days} days old')
#

or at the end (this is effectively a repeat-until loop):

#
while True:
    age = int(input('Enter age, -1 to finish:'))
    days = round(age * 365.25)
    print(f'You are over {days} days old')
    if age == -1:
        break
#