Hello!I´m using Idle (Python 2.7,5 version). I´m trying to write a program of compare function that returns 1 if a > b , 0 if a == b , and -1 if a < b . In which I´m want to get the user to prompt for the values of a and b. For some reason I can´t run it. The follwing is what I have written on my script: def comparefunc (a, b): a = 3 b = 4 if a < b: return 1 elif a == b: return 0 elif a < b: return -1 print "return" And, this is what I get for my output: Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32Type "copyright", "credits" or "license()" for more information.>>> ================================ RESTART ================================>>> >>>
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor