[Tutor] Beginner's question

Asokan Pichai pasokan at talentsprint.com
Thu Nov 22 16:18:25 CET 2012


How about this?
# Assumption x, y, z are all > 0
x, y, z =
a = x * (x % 2)
b = y * (y % 2)
c = z * (z % 2)
big = a
if big < b:
   big = b
if big < c
   big = c

if big == 0:
   print "No odd number"
else:
   print big, "is biggest odd number"


Asokan Pichai

If a language is designed for non-programmers, soon only
non-programs get written in it.                 --- Anonymouse
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20121122/ee78fc8e/attachment.html>


More information about the Tutor mailing list