Skip to content

While Loops

Choose a tag to compare

@Xjectro Xjectro released this 03 May 16:50
· 130 commits to main since this release

while loop = execute some code WHILE some condition remains true

age = int(input("Enter your age: "))

while age <= 0:
print("You are not born yet")
age = int(input("Enter your age: "))

print(f"Your age {age} years old")