-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDispense
59 lines (57 loc) · 2.48 KB
/
Dispense
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
48
49
50
51
52
53
54
55
56
57
58
59
print('Welcome to IGBOZE Bank ATM')
restart=('Y')
chances = 3
balance = 67.14
while chances >= 0:
pin = int(input('Please Enter You 4 Digit Pin: '))
if pin == (1234):
print('You entered you pin Correctly\n')
while restart not in ('n','NO','no','N'):
print('Please Press 1 For Your Balance\n')
print('Please Press 2 To Make a Withdrawl\n')
print('Please Press 3 To Pay in\n')
print('Please Press 4 To Return Card\n')
option = int(input('What Would you like to choose?'))
if option == 1:
print('Your Balance is £',balance,'\n')
restart = input('Would You you like to go back? ')
if restart in ('n','NO','no','N'):
print('Thank You')
break
elif option == 2:
option2 = ('y')
withdrawl = float(input('How Much Would you like to
withdraw? \n£10/£20/£40/£60/£80/£100 for other enter 1: '))
if withdrawl in [10, 20, 40, 60, 80, 100]:
balance = balance - withdrawl
print ('\nYour Balance is now £',balance)
restart = input('Would You you like to go back? ')
if restart in ('n','NO','no','N'):
print('Thank You')
break
elif withdrawl != [10, 20, 40, 60, 80, 100]:
print('Invalid Amount, Please Re-try\n')
restart = ('y')
elif withdrawl == 1:
withdrawl = float(input('Please Enter Desired amount:'))
elif option == 3:
Pay_in = float(input('How Much Would You Like To Pay In? '))
balance = balance + Pay_in
print ('\nYour Balance is now £',balance)
restart = input('Would You you like to go back? ')
if restart in ('n','NO','no','N'):
print('Thank You')
break
elif option == 4:
print('Please wait whilst your card is Returned...\n')
print('Thank you for you service')
break
else:
print('Please Enter a correct number. \n')
restart = ('y')
elif pin != ('1234'):
print('Incorrect Password')
chances = chances - 1
if chances == 0:
print('\nNo more tries')
break