Re: [Tutor] Problems understanding code output

2013-07-18 Thread Dave Angel
On 07/10/2013 05:05 PM, s...@luo.to wrote: This is going a little over my head, please advice, what am I missing in here? While you're watching, we could also point out that you posted a message in html format. There were actually two messages inside there, and many people will see the

Re: [Tutor] Problems understanding code output

2013-07-18 Thread Andrew Van Valkenburg
I'm not really sure what you are asking, but the formatting for your code is pretty screwy. I reformatted it and changed the print statements slightly to make it more readable and it works fine from what I can see. def printMax(a, b): if a > b: print a, 'is maximum' elif a == b: print

Re: [Tutor] Problems understanding code output

2013-07-10 Thread Dave Angel
On 07/10/2013 05:05 PM, s...@luo.to wrote: def printMax(a, b): if a > b: print(a, 'is maximum') elif a == b: print(a, 'is equal to', b) else: print(b, 'is maximum') printMax(3, 4) # directly give literal values x = 5 y = 7 printMax(x, y) # give variables as arg

[Tutor] Problems understanding code output

2013-07-10 Thread ska
def printMax(a, b): if a > b: print(a, 'is maximum') elif a == b: print(a, 'is equal to', b) else: print(b, 'is maximum') printMax(3, 4) # directly give literal values x = 5 y = 7 printMax(x, y) # give variables as arguments How the code above values to: