Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Topics: Pseudocode, Branching, For and While Loops, Sequences, Basic I / OProblem description:Write a Python application to simulate a Password Storage and Management system. The

Topics: Pseudocode, Branching, For and While Loops, Sequences, Basic I/OProblem description:Write a Python application to simulate a Password Storage and Management system. The purpose ofthis assignment is to gain experience in Pythons loop (while and for) structure, conditional structure,sequences, and basic I/O.Design solution:The program initially provides a menu to the user. The user can choose an operation by entering thenumber associated with that option as input. The three operations of the menu are explained below.1. Add username and password to the database: The program asks the user to input a username andpassword. There are no specifications for the username. However, the password must consist of sixcharacters: two upper case letters, two lower case letters, and two digits, in any order. The passwordshould not contain any other characters (special symbols, etc.) at all. An example username can beJaneDoe and a password can be Gr81aB. The program will go on to check whether the passwordmeets these requirements or not. If successful, the program joins the username and password by a -.An example would look like JaneDoe-Gr81aB. This string will then be appended to the globaldatabase list.Four lists, upper_case_letters list of all letters in upper caselower_case_letters list of all letters in lower casedigits list of all digitsdatabase list of username-password stringswill be provided to you in the template. You can use these lists accordingly. If not successful, print theerror message providing the reason along with the number of upper- and lower-case letters and digitsin the password entered by the user.Please note: All the usernames in the database list must be unique. So, when the user provides theusername as input, please check that they are not giving a username already in the database list.2. Displaying the list of passwords and usernames: On selecting this option, the program outputs allthe usernames and passwords present in the database at that time. You will have to split theusername and password from the username-password string explicitly and print them separately.Please do not print the whole sequence type as-is.3. Update the password of an existing user: The program asks the user to input the username forwhich the password is to be updated from the database list. It then finds the particular username-password string associated with the input username and updates the username-password stringfrom the database list. Display an informational message once updated.4. Exit/terminate the program.If the user enters any other option, display a message stating that the option is invalid and a requestto try again.Notes: You need to write pseudocode to plan the program, and it needs to be submitted inside thetemplate file in the Pseudocode section of the header. Helpful Code and Hints:o For password checking, while loop video lecture 3.5 in Module 3:simple_authenticaltion_system.py and extended_simple_authentication_system.pyo Menu program: 3.6 while loop use case: simple calculator application in Module 3o Generic string and list operations: Video Lecture 4.3 and 4.5 in Module 4. Hint: Howcan you split a string by a delimiter?o Accessing a list database: Review how to access each item in a list using a for loopo How to update a particular item in a list (needed for option 3): Think aboutupdating an item by index.Sample I/O: Sample I/O is provided for your clear understanding. You need to use the format functionto properly display the information. Please note that the sample I/O is only provided to clarify what isexpected from the program. You need to test your code on the given I/O. You may change thelanguage/interface but the program needs to display the information as shown:Example 1:*** Welcome to Password Storage and Management system ***Available options:1: Add password2: Display usernames and passwords3: Update password by username4: ExitEnter option: 1*** Add username and password to the database ***Enter your username: janeDoeEnter your password (Example: ABcd56): M8soN1Password Accepted!Adding username and password janeDoe-M8soN1 to the database*** Welcome to Password Storage and Management system ***Available options:1: Add password2: Display usernames and passwords3: Update password by username4: ExitEnter option: 1*** Add username and password to the database ***Enter your username: MaryUsername Mary already in database! Choose 3 to update.*** Welcome to Password Storage and Management system ***Available options:1: Add password2: Display usernames and passwords3: Update password by username4: ExitEnter option: 2*** Displaying list of passwords and usernames ***Username Jake: Password ABab12Username Mary: Password B0zrR2Username Bob: Password Xy1Zi4Username Janet: Password 34NmhHUsername Henry: Password 7iKoO5Username janeDoe: Password M8soN1*** Welcome to Password Storage and Management system ***Available options:1: Add password2: Display usernames and passwords3: Update password by username4: ExitEnter option: 3*** Update password of an existing user ***Enter the username you would like to update the password: JakeEnter the new password: Qj1Np2Password updated for user: Jake*** Welcome to Password Storage and Management system ***Available options:1: Add password2: Display usernames and passwords3: Update password by username4: ExitEnter option: 2*** Displaying list of passwords and usernames ***Username Jake: Password Qj1Np2Username Mary: Password B0zrR2Username Bob: Password Xy1Zi4Username Janet: Password 34NmhHUsername Henry: Password 7iKoO5Username janeDoe: Password M8soN1*** Welcome to Password Storage and Management system ***Available options:1: Add password2: Display usernames and passwords3: Update password by username4: ExitEnter option: 5Not a valid selection. Please try again.*** Welcome to Password Storage and Management system ***Available options:1: Add password2: Display usernames and passwords3: Update password by username4: ExitEnter option: 4>>>Example 2:*** Welcome to Password Storage and Management system ***Available options:1: Add password2: Display usernames and passwords3: Update password by username4: ExitEnter option: 1*** Add username and password to the database ***Enter your username: PeterParkerEnter your password (Example: ABcd56): AntMa1Password RejectedNumber of uppercase letters 2, lowercase letters 3, digits 1*** Welcome to Password Storage and Management system ***Available options:1: Add password2: Display usernames and passwords3: Update password by username4: ExitEnter option: 4
Show me the code with output. For both example please

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago