Answer to Question #303877 in Python for Eren

Question #303877


  • script module that will let the user to enter his/her password and username, if username is "X" or "x", program will exit. if username and password are correct, a welcome message and the menu will be displayed . Otherwise, prompt the user for username and password again. program must perform the view, add or delete friend function depend on user input.
  • a myLogin module that will retrieve the information of the user given username and password.
  • a manageData module that will allow the retrieval, adding and deleting of friend(s).


The content of each file follow below format:


username1;[username2];[username3];

Input


1. data

Output


Enter·username:·prettyME
Enter·password:·1234
Welcome,·Rhea·Tortor!

1·-·View·Friend
2·-·Add·friend
3·-·Delete·Friend
X·-·Exit

Enter·your·choice:·X
Successfully·LogOut.
Enter·username:·X
1
Expert's answer
2022-02-28T13:55:03-0500
def script(n, p):
    user_name = input('Enter user name here: ')
    password = input('Enter password here: ')
    while user_name != X or user_name != x:
        if user_name == n and password == p:
            print('Welcome Rhea Tortor')
            print(
                '1.-. View Friend')
            print('2.-. Add Friend')
            print('3.-. Delete Friend')
            print('4.-. Exit')
def store_login():
    name = input('Enter full name')
    age = input('Enter age here')
    address = input('Enter address here')
def mylogin(n, p):
    username = input('Enter username here')
    password = input ('Enter password here')
    if username == n and password == p:
        store_login()
def manage_data(n):
    list1 = []
    for i in range(n):
        friends = input('Enter name of friend')
        list1.append(friends)
    print('1. Do you  to see friend list')
    print('2. Do you want to add friends')
    print('3. Do you want to remove')
    choices = input('Enter choices here')
    if choices == 1:
        print(list1)
    elif choices == 2:
        i = input('Enter friend name to be added')
        list1.append(i)
    elif choices == 3:
        i = input('Enter name of friend to be removed')
        list1.remove(i)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS