53 lines
1.5 KiB
Python
53 lines
1.5 KiB
Python
from src.tools.tools import *
|
|
from init import *
|
|
|
|
mode = "running"
|
|
|
|
while mode != "exit":
|
|
input()
|
|
|
|
counter = 1
|
|
for card in cards:
|
|
print(str(counter) + ": " + card)
|
|
counter += 1
|
|
|
|
card = cards[input("Enter number of card you wish to use: ")]
|
|
|
|
if VerifyInvalidCard(card):
|
|
print("That is not a valid ATM card")
|
|
continue
|
|
|
|
if VerifyOwner(card):
|
|
print("What do you want to do?")
|
|
print("1. Check your account")
|
|
print("2. Withdraw Money")
|
|
print("3. Deposit Money")
|
|
print("4. Add credits to your pre-paid phone card")
|
|
print("5. Transfer Money")
|
|
print("6. Exit")
|
|
|
|
operation = input()
|
|
|
|
if operation == "1":
|
|
CheckAccount(card.account)
|
|
elif operation == "2":
|
|
amount = int(input ("How much money do you want to withdraw?"))
|
|
WithdrawMoney(amount, card.account)
|
|
elif operation == "3":
|
|
notes = []
|
|
value = int(input("Value of the inserted note: "))
|
|
notes.append(value)
|
|
while value != 0:
|
|
value = int(input("Value of the next note (0 to exit): "))
|
|
notes.append(value)
|
|
DepositMoney(notes, card.account)
|
|
elif operation == "4":
|
|
operator = input("Enter name of your phone card operator: ")
|
|
amount = int(input("How much credits do you wish to add?"))
|
|
GeneratePrepaidPhoneCode(amount, operator, card.account)
|
|
elif operation == "5":
|
|
accountTo = input("Enter account number to which money should be transfered: ")
|
|
amount = int(input("How much money should be transfered?: "))
|
|
TransferMoney(card.account, bank[accountTo], amount)
|
|
elif operation == "6":
|
|
mode = "exit" |