[Tutor] help (stack are confusing me could someone help out with this simple program)

Dan Dud wheelcrdan@hotmail.com
Mon Oct 21 22:41:01 2002


help

Hi everyone

Hope everyone is having a great monday, well at least as good as mondays 
could get.. Anyways I have this program that I just want it to compare two 
things and let you choose if its <,>, == I am starting to catch on alot 
after starting to read "how to think like computer scientest.... I've been 
reading so many books and articles anything I can get my hands on but none 
of them apply them to each other like that does.. Here is the code I know 
the stack is messed up I understand first in last out but not sure how to 
make this work correctly tring to apply that. Does anyone have any 
sugestions to better brake down a program so I know what to put in first and 
what to put in last here is the program I know it needs help I just don't 
quite know where


def x():
    print x()
def y():
    print y()

def compare(x,y):
	if x < y:
		print x, "is less then", y

	elif x > y:
		print x, "is greater then", y
	else:
		print "and", y, "are equal"

def functionA ():
    if x == y:
        print x, "and", y, "are equal"
    else:
        if x < y:
            print x, "is less then", y
        else:
            print x, "is greater than", y

def functionB ():
    print
def functionC ():
    print

def disbatch (choice):
	if choice == 'a' or 'A':
		functionA()
	elif choice == 'b' or 'B':
		functionB()
	elif choice == 'c' or 'C':
		functionC()
	else:
		print "Invalad choice"

Thanks ahead of time for the help have a great night or mornig what ever it 
might be..

Danny D





_________________________________________________________________
Surf the Web without missing calls! Get MSN Broadband. 
http://resourcecenter.msn.com/access/plans/freeactivation.asp