Question: Using the following guidelines, create a python program code Adjust the program code so that there are two users that can log into the system.
Using the following guidelines, create a python program code
Adjust the program code so that there are two users that can log into the system. One is Joe and the other is Natalie. They will both have the same password (swordfish). Ensure that you change the greeting so that it states the correct name of the user that logs in.Using a for loop and the range() function, add code at the end that will print out the alphabet. Need to use continue and break statement..
What output should look like
Who are you? Any name that is not Joe or Natalie would loop back to Who are you?. Once name Joe or Natalie was entered you get the below output Hello, Joe. What is the password? (It is a fish.) or Hello, Natalie. What is the password? (It is a fish.) If swordfish is put in as password you would get Access granted ABCDEFGHIJKLMNOPQRSTUVWXYZ
Hints 1. The Python chr() function will return the character corresponding to an ASCII value. This is useful inside of a for loop. a. Example: chr(65) = 'A', chr(66) = 'B' etc. 2. Research the Python print() function and the use of the end attribute to prevent an automatic line feed
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
