Skip to content

Instantly share code, notes, and snippets.

@BensonMuriithi
Last active August 3, 2016 20:03
Show Gist options
  • Save BensonMuriithi/cbd516f7056503a8b33e931ef916fbe1 to your computer and use it in GitHub Desktop.
Save BensonMuriithi/cbd516f7056503a8b33e931ef916fbe1 to your computer and use it in GitHub Desktop.
My solution for 'Max of Three' exercise on practicepython.org ->http://www.practicepython.org/exercise/2016/03/27/28-max-of-three.html
def whosmax(*args):
start = 0
limit = len(args)
i = 1
while i < limit:
if args[start] < args[i]: start = i
i += 1
return args[start]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment