Question: Write a python program (passwords.py) that will generate and print a passwords according to the following rules: Starts with an uppercase letter. Includes one special

Write a python program (passwords.py) that will generate and print a passwords according to the following rules:

Starts with an uppercase letter.

Includes one special character randomly selected from the string: !@#$

Includes at least six lower-case letters.

Ends with one integer in the range of 0 to 9 (inclusive).

The program should prompt the user for the length of the password, which should be at least 9).

The user should decide if they want to create more passwords as shown in the sample output below.

Implementation details:

The valid ASCII codes for uppercase characters are 65..90, and for lowercase characters are 97..122. Hint: use the chr() function.

Your program should verify that the user provided a valid input for the size of the password, otherwise it should prompt the user again.

o Invalid input would be anything that is not a number or any integer < 9.

o The size of the password determines the number of lowercase characters that the password will include.

You should avoid infinite loops and the break statement.

Sample Output:

Enter the size of your password: 10

Suggested password: Y!mebjivm7

Are you satisfied with your password (yes/no)? No

Enter the size of your password: 12

Suggested password: O@eqdafkjig2

Are you satisfied with your password (yes/no)? NO

Enter the size of your password: 8

The password should be at least 9 characters. Try again!

Enter the size of your password: 15

Suggested password: V$drvebtbakswx7

Are you satisfied with your password (yes/no)? no

Enter the size of your password: twelve

The size should be a number. Try again!

Enter the size of your password: 12

Suggested password: Q#lcuzccopr8

Are you satisfied with your password (yes/no)? yeah

Great! This password is random enough!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!