Added 200 coin limit to coin.py

This commit is contained in:
Luke Rogers 2012-02-17 13:46:09 +13:00
parent ab2eb8c4f3
commit 0eb3775e61

View file

@ -24,9 +24,12 @@ def coin(inp):
count = int(inp) count = int(inp)
else: else:
if inp: if inp:
return "Invalid Input :(" return "Invalid input."
else: else:
count = 1 count = 1
if count > 200:
return "Too many coins! Maximum is 200."
# depending on the count, we use two different methods to get the output # depending on the count, we use two different methods to get the output
if count == 1: if count == 1:
flip = random.randint(0,1) flip = random.randint(0,1)