In: Computer Science
In Python: Program. At the university, passwords for the campus computer system must meet the following requirements:
Start by translating the pseudocode below into a python function. Add the last two requirements to your function.
Note : please follow the space indentation exactly as oer in the program screen\shot .So that your program works perfectly. Thank You
______________________________
______________________
uppercnt=0
lowercnt=0
digitcnt=0
specialcnt=0
spacecnt=0
while 1:
password=input("Enter password :")
for i in range(len(password)):
if password[i].isupper():
uppercnt+=1
elif password[i].islower():
lowercnt+=1
elif password[i].isdigit():
digitcnt+=1
elif password[i].isspace():
spacecnt+=1
else:
specialcnt+=1;
if uppercnt>0 and lowercnt>0 and digitcnt>0 and
specialcnt>=2 and spacecnt==0:
print("Password is valid")
break
else:
if uppercnt==0:
print("Must contain one uppercase letter")
if lowercnt==0:
print("Must contain one lowercase letter")
if digitcnt==0:
print("Must contain one digit")
if specialcnt<2:
print("Must contain two special character")
if spacecnt!=0:
print("Must not contain spaces")
continue
________________________________________
Output:
_______________Could you plz rate me well.Thank
You