Re: [Tutor] Complications Take Two (Long) Frustrations.

2015-08-25 Thread Roel Schroeven
Steven D'Aprano schreef op 2015-08-22 09:00: On Fri, Aug 21, 2015 at 11:29:52PM +0200, Roel Schroeven wrote: Joel Goldstick schreef op 2015-08-21 23:22: so: print -max(-A, -B) That's what I mean, yes. I haven't tried it, but I don't see why it wouldn't work. It won't work with anything

Re: [Tutor] Complications Take Two (Long) Frustrations.

2015-08-22 Thread Laura Creighton
In a message of Sat, 22 Aug 2015 17:00:55 +1000, Steven D'Aprano writes: On Fri, Aug 21, 2015 at 11:29:52PM +0200, Roel Schroeven wrote: Joel Goldstick schreef op 2015-08-21 23:22: so: print -max(-A, -B) That's what I mean, yes. I haven't tried it, but I don't see why it wouldn't work.

Re: [Tutor] Complications Take Two (Long) Frustrations.

2015-08-22 Thread Steven D'Aprano
On Fri, Aug 21, 2015 at 11:29:52PM +0200, Roel Schroeven wrote: Joel Goldstick schreef op 2015-08-21 23:22: so: print -max(-A, -B) That's what I mean, yes. I haven't tried it, but I don't see why it wouldn't work. It won't work with anything which isn't a number: py min(hello,

Re: [Tutor] Complications Take Two (Long) Frustrations.

2015-08-21 Thread Roel Schroeven
Joseph Gulizia schreef op 2015-08-20 05:12: Assume that the grader defines two variables A and B for you. Write a program which prints out the value min(A, B) However, there is a catch: your program is not allowed to use the min function. Instead, use max in a clever way to simulate min.

Re: [Tutor] Complications Take Two (Long) Frustrations.

2015-08-21 Thread Roel Schroeven
Joel Goldstick schreef op 2015-08-21 23:22: so: print -max(-A, -B) That's what I mean, yes. I haven't tried it, but I don't see why it wouldn't work. Regards, Roel -- The saddest aspect of life right now is that science gathers knowledge faster than society gathers wisdom. -- Isaac

Re: [Tutor] Complications Take Two (Long) Frustrations.

2015-08-21 Thread Joel Goldstick
On Fri, Aug 21, 2015 at 4:58 PM, Roel Schroeven r...@roelschroeven.net wrote: Joseph Gulizia schreef op 2015-08-20 05:12: Assume that the grader defines two variables A and B for you. Write a program which prints out the value min(A, B) However, there is a catch: your program is not allowed

[Tutor] Complications Take Two (Long) Frustrations.

2015-08-19 Thread Joseph Gulizia
Complicating a simple expression Coding Exercise: Complication Assume that the grader defines two variables A and B for you. Write a program which prints out the value min(A, B) However, there is a catch: your program is not allowed to use the min function. Instead, use max in a clever way to