-
Notifications
You must be signed in to change notification settings - Fork 0
/
voting project.txt
47 lines (39 loc) · 1.52 KB
/
voting project.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
acc_num=0
with_amount=None
accounts = {77493843:{"balance_acc":10000}, 20110159:{"balance_acc":15000,},41920784:{"balance_acc":1000},16340262:{"balance_acc": 34000},27323237:{"balance_acc": 43567}}
def balance():
print("Account balance is $ :",accounts[acc_num]["balance_acc"])
def withdraw():
global with_amount
with_amount=print("Enter an Amount to withdraw:-")
while with_amount<accounts[acc_num]["balance_acc"]:
if with_amount>=accounts[acc_num]["balance_acc"]:
print("Sorry You can't Withdraw Money")
print("Withdraw amount should lesser than Account Balance")
print(f"Your Account Balnce is {balance()}")
def deposit():
# Implement the deposit logic here
pass
def main():
global acc_num
acc_num = int(input("Enter your account Number:-"))
while True:
if acc_num in accounts:
print("Enter option 01:-To check the Balance")
print("Enter option 02:-To Withdraw Money")
print("Enter option 03:To Deposit Money")
option = int(input("Choose one of 3 Options"))
if option == 1:
balance()
elif option == 2:
withdraw()
elif option == 3:
deposit()
else:
print("Please Enter a Number between 1 and 3")
continue
else:
print("Invalid account number. Please try again.")
acc_num = int(input("Enter your account Number:-"))
continue
main()