ok so heres the thing, ive got to to do this program for college but the lecturer is a numpty and wont help anyone. so im stuck. ive only got so far into the program and cant get the most important bit to work where it is supposed to.
its a python code for an atm machine program, and needs a pin number to be read in and verified, then a menu to show a withdraw with statement and a with draw without statement, within these 2 have to be the option to select either £50, £100, £150,£200. ive only got the following code if anyone can help point me in the right direction it would be a great help.
many thanks craig
import os
import time
# pin validation
def pin():
print "welcome to the Bellco Atm"
print "========================="
print "please enter your card into the slot provided"
print "============================================="
print "card accepted, awaiting pin"
print "==========================="
print "please enter you pin"
print "===================="
def withdrawal_with_statement():
print "please enter the amount you wish to withdraw"
print "1 50"
print "2 100"
print "3 150"
print "4 200"
print "5 exit menu"
#print greeting
print
print "welcome to the bell co banking program"
print "======================================"
print
def check_pin(pin):
"""check if pin number pin is between 1000 and 9000"""
if 1000 <= pin <= 9000:
return True
return False
pin = input("Enter pin number (between 1000 and 9000): ")
print check_pin(pin)
#define menu
print
while True:
# print out the menu
print "please select an option :"
print "1 withdrawal with statement"
print "2 withdrawal without statement"
print "3 statement only"
print "x exit"
# get the user's choice:
choice = raw_input("> ")
# carry out task:
if choice == '1':
withdrawal_with_statement()
elif choice == '2':
withdrawal_without_statement()
elif choice == '3':
statement_only()
elif choice == 'x':
print "thank you for using this program"
break
else:
print "invalid choice"
print