Added 200 coin limit to coin.py
This commit is contained in:
parent
ab2eb8c4f3
commit
0eb3775e61
1 changed files with 4 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Reference in a new issue