Skip to content

Instantly share code, notes, and snippets.

@rukku
Created August 5, 2012 06:01
Show Gist options
  • Save rukku/3262132 to your computer and use it in GitHub Desktop.
Save rukku/3262132 to your computer and use it in GitHub Desktop.
Math question from kenan
# x < 8
# x - y > 2
# what is max x + y
values = []
for x in range(100):
for y in range(100):
if x < 8 and x - y > 2:
print x + y
values.append(x+y)
print "Maximum value is", max(values)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment