Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I'm working on the Python ATM simulator. The extended functionality part for admin. Here is what I have but I'm hung up on bold/italic area

I'm working on the Python ATM simulator. The extended functionality part for admin.

Here is what I have but I'm hung up on bold/italic area... what am I missing here?

admin_username = "SysAdmin" admin_password = "1357" while True: print("Username: ", end=" ") user = input() print("Password: ", end=" ") pw = input() if user == admin_username and pw == admin_password: print("Welcome admin") else: print("Incorrect, please reenter") print("1 - add user, 2 - delete user, 3 - plot") option = int(input(1,2,3)) if option == 1: print("Enter Username: ", end=" ") user = input() print("Enter Password: ", end=" ") pw = input() with open('adminsample.txt', 'w') as f: data = f.write() with open( user, "a+") as g: g.write(pw) elif option == 2: import os if os.path.exists("admindemofile.txt"): os.remove("admindemofile.txt") else: print("The file does not exist") elif option == 3: users = [] pws = [] with open("adminsample.txt", "r") as f: for user in f: users.append(user) with open(user, "r") as g: pw = g.read() pws.append(pw) import matplotlib.pyplot as plt plt.bar(pws, users, align='center', alpha=0.5) plt.xticks(pws, users)

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions