36 Program to demonstrate While loop Continue and Break in Python

Program:

while True:

    name=input("enter user name:")

    if name !='atharva':

        continue

    password=input("Hello Atharva......enter ur password:")

    if password=='python':

        break

print('Access granted')


Output:

Program to demonstrate While loop Continue and Break in Python

Previous
Next Post »