当前位置: 首页>>代码示例>>Python>>正文


Python Account.open_account方法代码示例

本文整理汇总了Python中account.Account.open_account方法的典型用法代码示例。如果您正苦于以下问题:Python Account.open_account方法的具体用法?Python Account.open_account怎么用?Python Account.open_account使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在account.Account的用法示例。


在下文中一共展示了Account.open_account方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: main

# 需要导入模块: from account import Account [as 别名]
# 或者: from account.Account import open_account [as 别名]
def main():
    """Runs program with account.py and general_functions.py.

    When the program starts, it asks the user for a username and a password. This will be the account the user will use
    for this program. Note: The full user back-end is not programmed yet and so the users info is not used/saved!

    """
    top_menu = "\n\nWelcome to the Banking Simulator!"
    top_spacer = "-" * len(top_menu)
    print("{}\n{}".format(top_menu, top_spacer))
    account = Account()

    while True:
        account.menu_screen()
        cmd = input("> ")

        if cmd == "help":
            menu_help()
        elif cmd == "account":
            account.account_bridge()
        elif cmd == "info":
            account.account_info()
        elif cmd == "deposit":
            account.deposit()
        elif cmd == "withdraw":
            account.withdraw()
        elif cmd == "open account":
            account.open_account()
        elif cmd == "close account":
            account.close_account()
        elif cmd == "save":
            save(account)
        elif cmd == "simulation":
            account.time_simulation()
        elif cmd[0].lower() == "q":
            break
        else:
            print("\nERROR: Input not valid!")
开发者ID:Kwistech,项目名称:BankingSimulator,代码行数:40,代码来源:main.py


注:本文中的account.Account.open_account方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。