Skip to content

py.. #342

Description

@title Default title text

1. create the vault

vault = {
"gmail": "abc123",
"discord": "hello123",
"github": "python123"
}

while True:
print("---PASSWORD VAULT---")
print("1.View Accounts:")
print("2.Add account")
print("3.Search Account")
print("4.Delete Account")
print("5.Exit")

choice = input("choose an option:")

if choice == "1":
    print("---SAVED ACCOUNTS---")
    for account in vault:
        print(account)

elif choice == "2":
    account_name = input("Enter account name: ")
    password = input("Enter password: ")
    vault[account_name] = password
    print(f"Account '{account_name}' added successfully.\n")

elif choice == "3":
    search_account = input("Enter account name to search: ")
    if search_account in vault:
        print(f"Account: {search_account}, Password: {vault[search_account]}\n")
    else:
        print(f"Account '{search_account}' not found.\n")

elif choice == "5":
    print("Exiting Password Vault. Goodbye!")
    break

else:
    print("Invalid choice. Please enter a number between 1 and 5.\n")

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions