-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpro2.py
37 lines (31 loc) · 1.39 KB
/
pro2.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
26
27
28
29
30
31
32
33
34
35
36
login = {'ritesh':'Mark 1234','steve':'Stevejobs 1','elon':'Elon musk 1'}
user_id = raw_input("Username please ")
if user_id not in login:
print(" user_id not found")
else:
password = raw_input("Enter password ")
if(password == login[user_id]):
print("Access Granted")
print "1.Change password."
print "2.Continue without changing."
input = int(raw_input("Your option is "))
if input == 1:
npassword = raw_input("Whats your new pasword? ")
if len(npassword) < 8 :
print("Password too short.")
elif "npassword".islower() == False:
print("Password must contain atleast one number and one cassed letter and no other . ")
elif "npassword".isalpha() == False:
print("Password must contain atleast one number and one cased letter and no other characters. ")
else:
password2 = raw_input("Retype password ")
print("Password good.")
if password2 == npassword:
print("Password matched.Congrats.")
print "password changed"
else:
print "Passwords do not match.Try Again."
else:
print("Thanks you may continue with your account.")
else:
print("Access Denied")