-
Notifications
You must be signed in to change notification settings - Fork 0
/
PAVITHRAN_4AL17EC068.py
25 lines (19 loc) · 947 Bytes
/
PAVITHRAN_4AL17EC068.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#Write python code to verify user_name = "Micheal" and password ="e3$WT89x". The total number of attempts are 03. For every wrong user_name and password Print - Invalid username or Password, upon three attempts fails print- Account locked. If inputs are correct Print - You have successfully login
def para(user_name, password):
if user_name == "Micheal" and password == "e3$WT89x":
return "login sucessful"
attempt = 0
while attempt <=3:
if attempt == 2:
return "you account has been locked"
else:
print ("Invalid username or password")
a = input ("Enter username: ")
b = input ("Enter Password: ")
if a == "Micheal" and b == "e3$WT89x":
return "login sucessful"
attempt = attempt+1
a = input("Enter username: ")
b = input("Enter Password: ")
print(para(a,b))
# Very good, your code is fine