0% found this document useful (0 votes)
2 views1 page

Python Easy Program 2

This document describes a simple program that prompts the user to enter a PIN. The user has a maximum of 5 attempts to enter the correct PIN, after which they are locked out. If the correct PIN is entered, a welcome message is displayed and the program exits.

Uploaded by

uvkvsingh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Python Easy Program 2

This document describes a simple program that prompts the user to enter a PIN. The user has a maximum of 5 attempts to enter the correct PIN, after which they are locked out. If the correct PIN is entered, a welcome message is displayed and the program exits.

Uploaded by

uvkvsingh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

pin=1313

attempts=0
max_attempts=5
while True:
A=int(input("enter your code:"))

if pin==A:
print("welcome to your program")
break
elif attempts==max_attempts:
print("you have reached the maximum number of attempts, try after some time")
break
else:
attempts+=1
print("wrong pin! try again")

You might also like