Jul-28-2017, 08:04 AM
First of all, don't use buzzwords like URGENT in your topic. This will lead not to answer a question.
Some hints.
Some hints.
- Don't use pickle to save consistent data outside of Python. Sometimes the format changes after an update and then your data is lost. Use something different. First you can try plain text files, later you should look for an database.
- Don't invent your own password manager, if you don't know about hashing, symmetric and asymmetric encryption and entropy. You can still do your program, to understand the concepts behind a little bit better.
- Functions in Python are doing something. Use verbs for functions, lower case and underscore.
- Look into the string module of the Python stdlib. There are already prepared strings for ascii_lowercase, ascii_uppercase, digits
- Python don't have a switch statement. Instead of asking for every selected option, you can make a dict for this task:
def create_user(): username = input('Enter your username: ') # code def delete_user(): username = input('Enter your username: ') # code selection_dict = {0: create_user, 1: delete_user} userinput = int(1) # user choose option 1 try: function_to_call = selection_dict[userinput] except KeyError: print('You have selected a non existing option...') else: function_to_call()
- Later you can try to do the same task object oriented. But first do the basics.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!