Write a method to prompt the user to choose a password. The password must contai
ID: 3678872 • Letter: W
Question
Write a method to prompt the user to choose a password. The password must contain at least one uppercase letter, one lowercase letter, one digit, and one special character (defined as a character that is neither a letter nor a digit). If the string the user enters does not meet these requirements, display an error message indicating the unmet requirement(s) and re-prompt the user. Below is a sample execution. output should look similar to this :
Please choose a password: mypassword
Your password must contain a uppercase letter
Your password must contain a digit
Your password must contain a special character
Please choose a password: myPassword
Your password must contain a digit
Your password must contain a special character
Please choose a password: my_Password
Your password must contain a digit
Please choose a password: my_Password1234
Password = my_Password1234