Question

In: Computer Science

In Python: Program. At the university, passwords for the campus computer system must meet the following...

In Python: Program. At the university, passwords for the campus computer system must meet the following requirements:

  • The password must be at least seven characters long.
  • It must contain at least one uppercase letter.
  • It must contain at least one lowercase letter.
  • It must contain at least one numeric digit.
  • It must include two special symbols
  • It must contain no spaces

Start by translating the pseudocode below into a python function. Add the last two requirements to your function.

Solutions

Expert Solution

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


Related Solutions

Write a program that validates passwords based on the following requirements: • must be at least...
Write a program that validates passwords based on the following requirements: • must be at least 8 characters in length • must include at least 1 alphabet character • must include at least 1 number The program should implement the password checker using a function name validate_password, which takes two strings as input and returns one of the following: • 0 if the passwords match and fulfill all requirements • 1 if the passwords are not the same length •...
Write a program that validates passwords based on the following requirements: • must be at least...
Write a program that validates passwords based on the following requirements: • must be at least 8 characters in length • must include at least 1 alphabet character • must include at least 1 number The program should implement the password checker using a function name validate_password, which takes two strings as input and returns one of the following: • 0 if the passwords match and fulfill all requirements • 1 if the passwords are not the same length •...
[JAVA] You will write a program to validate passwords for users, making sure they meet the...
[JAVA] You will write a program to validate passwords for users, making sure they meet the following criteria: Rules: Passwords must be at least 8 characters long Passwords can only contain alpha numeric characters (no spaces or special characters) Passwords must contain at least 1 uppercase character Passwords must contain at least 1 lowercase character Passwords must contain at least 1 numeric character (0-9) Passwords cannot contain the word “password” A password that does not meet all of these rules...
For this assignment you will be creating a basic Hotel Reservation System. The program must meet...
For this assignment you will be creating a basic Hotel Reservation System. The program must meet the following guidelines: User can reserve up to 3 rooms at a time Your program will need to loop through to continue to ask needed questions to determine cost. Room rates (room variants): Suite $250 2 Queens $150 1 King $175 Ocean view add $50 Fridge for Room $25 Pets additional $50 Sales tax rate will be 5.5% Your program will show out the...
This document describes a computer program you must write in Python and submit to Gradescope. For...
This document describes a computer program you must write in Python and submit to Gradescope. For this project, the program will simulate the operation of a vending machine that sells snacks, accepting coins and dispensing products and change. In an actual vending machine, a program running on an embedded computer accepts input from buttons (e.g. a numeric keypad) and devices such as coin acceptors, and its output consists of signals that control a display, actuate motors to dispense products, etc.....
This document describes a computer program you must write in Python and submit to Gradescope. For...
This document describes a computer program you must write in Python and submit to Gradescope. For this project, the program will simulate the operation of a vending machine that sells snacks, accepting coins and dispensing products and change. In an actual vending machine, a program running on an embedded computer accepts input from buttons (e.g. a numeric keypad) and devices such as coin acceptors, and its output consists of signals that control a display, actuate motors to dispense products, etc.....
Program must be in Python Write a program in Python whose inputs are three integers, and...
Program must be in Python Write a program in Python whose inputs are three integers, and whose output is the smallest of the three values. Input is 7 15 3
Write a MIPS program to check if computer is a big-endian or little-endian system. This must...
Write a MIPS program to check if computer is a big-endian or little-endian system. This must be done in MIPS assembly language.
A computer system uses passwords that contain exactly 5 characters, and each character is 1 of...
A computer system uses passwords that contain exactly 5 characters, and each character is 1 of the 3 lowercase letters (a, b, c) or 3 upper case letters (A, B, C) or the 5 odd digits (1, 3, 5, 7, 9). Let Ω denote the set of all possible passwords, and let A and B denote the events that consist of passwords with only letters or only integers, respectively. Determine the probability that a password contains at least 1 uppercase...
A computer system uses passwords that contain exactly six characters, and each character is 1 of...
A computer system uses passwords that contain exactly six characters, and each character is 1 of the 26 lowercase letters (a–z) or 26 uppercase letters (A–Z) or 10 integers (0–9). Let Ω denote the set of all possible passwords, and let A and B denote the events that consist of passwords with only letters or only integers, respectively. Determine the number of passwords in each of the following events. (a) Password contains all lowercase letters given that it contains only...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT