コード例 #1
0
            if (response==True):
                client_account = client.account['account_number']
                print(f'_______________________________________________________________\n<<Account created successfully! Your account number is: {client_account}>>')

        # Selected if option 2: Access existing bank account
        elif choice == 2:
            
            # Build inter try statement to access account and validate account_number
            try:
                print(f' \nTo access your account, please enter your access information.\n ')
                name = input("Name: ")
                account_number = int(input("Account number: "))
            except Exception:
                print("Your account number is a five digit number")

            current_client = bank.authentication(name, account_number)
            if current_client:
                print()
                print("Welcome {}!".format(current_client.account['name']))
                acc_open = True
                while (acc_open==True):
                    print()
                    print("""Choose an option:

        1. Withdraw
        2. Deposit
        3. Balance
        4. Exit Account Window
                        """)
                    acc_choice = int(input("1, 2, 3 or 4: "))