def userfunctions(self):
        print("\n\nTo access any function below, enter the corresponding key")
        print("""To:
check Balance, press B.
deposit cash,  press D.
withdraw cash, press W.
Delete account press X.
Transfer ammount press T.
exit service,  press E\n
:"""),
        ans = input("").lower()
        if ans == 'b':
            ##passcheck function confirms stored password with user input
            self.passcheck()
            self.checkbalance()
        elif ans == 'd':
            self.passcheck()
            self.depositcash()
        elif ans == 'w':
            self.passcheck()
            self.withdrawcash()
        elif ans == 'x':
            print("%s, your account is being deleted" % self.username)
            time.sleep(1)
            print("Minions at work")
            time.sleep(1)
            filestore.deleteaccount(self.username)
            print("Your account has been successfuly deleted, goodbye")
        elif ans == 't':
            self.username
            self.withdrawcash1()
            self.transfer()
            print("Your Amount has been transfered to %s" % self.username)
        elif ans == 'e':
            print("Thank you for using PostBank Services")
            time.sleep(1)
            print("Goodbye %s" % self.username)
            exit()

        else:
            print("No function assigned to this key, please try again")
            self.userfunctions()
示例#2
0
    def userfunctions(self):
        print("\n\nTo access any functions below,enter the corresponding key")
        print("""To:
      Check Balance, Press B.
      Deposit cash, Press D.
      Withdraw cash, Press W.
      Delete Account, press X.
      Exit service, Press E.\n
      :""")

        ans = input("").lower()
        if ans == "b":
            self.passcheck()
            self.checkbalance()
        elif ans == "d":
            self.passcheck()
            self.depositcash()
        elif ans == 'w':
            self.passcheck()
            self.withdraw()
        elif ans == 'x':
            print("%s, Your account is being deleted" % self.ussrname)
            time.sleep(1)
            print("Minions at work")
            time.sleep(1)
            filestore.deleteaccount(self.username)
            print(
                "Your account has been succesfully deleted, we are sad to lose you"
            )
        elif ans == 'e':
            print("Thank you for using Stanbic Bank services")
            time.sleep(1)
            print("Goodbye%s" % self.username)
            exit()
        else:
            print("Incorrect Key, Please try again")
            self.userfunctions()