Solutions and answers to help you learn Python using the Think Python programming textbook
""" ============== exercise 6.1 ===============""" def compare (x, y): if x > y: return 1 elif x == y: return 0 elif x < y: return -1 print (compare (3,2)) print (compare (2,2)) print (compare (1,2))
Note: Only a member of this blog may post a comment.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.