Can I change the value of a boolean when my while loop hits a certain condition to activate a second "outcome"? - Python beginner

You can write your code like this to find your solution!

age = 14
drivers_license = False

while age <= 18:
    if age == 18:
        print(f"Now that you are {age}, you can get your drivers license!")
        drivers_license = True
    else:
        print(f"You are {age} years old, so you are still too young to drive!")
    if drivers_license == True:
        print("You are allowed to drive now!")
    age += 1