Can anyone help me understand whats going on here:
def
ATM():
pin = '2580'
balance = 3500
overdraft = 250
while True:
pin_input = raw_input('insert your PIN
number: ')
if pin == pin_input:
print 'select from the following
options:'
print
break
else:
print 'wrong pin, try again'
print
while True:
menu_input = raw_input('\n1. Balance
\n2. Withdraw \n3. Deposit \n4. Exit \nchoose from menu: ')
if menu_input == '1':
print '\nAvailable withdraw: ' + str(balance + overdraft)
print '\nYour overdraft limit is: '
+ str(overdraft)
elif menu_input == '2':
Withdraw_input = raw_input('insert
the amount you would like to take out: ')
if (int(Withdraw_input) >
balance + overdraft):
print 'you are beyond your
balance limit'
else:
print 'withdrawn: ' +
str(Withdraw_input)
if (int(Withdraw_input) >
balance):
overdraft == overdraft_2
overdraft_2 = overdraft -
(int(Withdraw_input) - balance)
balance = (balance +
overdraft)- int(Withdraw_input)
elif menu_input == '3':
Deposit_input = raw_input('enter
the deposit: ')
print 'The deposited is: ' +
str(Deposit_input)
balance = balance +
int(Deposit_input)
elif menu_input == '4':
print '\n Thank You for using our
service'
break
ATM
()
Youtube (2012). Python For Beginners: http://www.youtube.com/watch?v=29mq1Bn52GY
:)
:)
Here is a video for those who are beginners like me
i found python difficult but got the hang of it in the end
ReplyDeleteI found python very hard
ReplyDeletethe page layout is nice but it looks all the same to me.
ReplyDeleteI think you will need to write something in here for python??? :S
ReplyDeleteLOL^^
ReplyDelete