ok i know i have posted the same request before but i am still completley stuck with where to go from what i have got so far.

the program i have to do is basically a very simple atm program.
the user has to enter a pin number between 1000 and 9999 and it must be validated to allow the user to get into the system. also there has to be a reserved pin number for administrative purpose which is 1357.

then a menu which displays options to with draw money with a statement or without a statement and an option for a staement only i sto be displayed. within the 2 withdrawal functions the amounts of 50, 100, 150, and 200 have to be displayed.

and thats about it so far, i have already posted a piece of code but it wasnt developed as far as this one, i think i have all the functions in but whether or not they are in the correct place is a nother matter,

any help what so ever will be a great help, my lecturer (who is a python programmer) wont help me, and everyone in the class is at the same stage.

import os
import time
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)

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"

def withdrawal_without_staement():
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"
def statement_only():
print "your statement will be print in a few moments"

#start main program

#print greeting
print
print "welcome to the bell co banking program"
print "======================================"
print
#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

Member Avatar for leegeorg07

im not sure what to do as im new to programming altogether but if you have managed to figure it out then could you send me the save file?

First, you have a function to check the pin, but never ask for one. Also, you have to have some amount of money on file for known pins, so there has to be a dictionary or whatever that keeps track of the pin and the balance for that pin so you can print statements.

put your code between [ /code] tags mate so we can have a proper look at it.[code=python][ /code] tags mate so we can have a proper look at it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.