Skip to content

Instantly share code, notes, and snippets.

Created October 17, 2013 23:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/7034363 to your computer and use it in GitHub Desktop.
Save anonymous/7034363 to your computer and use it in GitHub Desktop.
def main(score, op_score):
score = int(input("How many points have you scored:"))
op_score = int(input("How many points has your opponent scored:"))
print ("The score is:", yourscore(score),"-", theirscore(score))
def yourscore(score):
if score == 0:
score = ("Love")
elif score == 1:
score = ("Fifteen")
elif score == 2:
score = ("Thirty")
else:
score = ("Forty")
return yourscore(score)
def theirscore(op_score):
if op_score == 0:
op_score = ("Love")
elif op_score == 1:
op_score = ("Fifteen")
elif op_score == 2:
op_score = ("Thirty")
else:
op_score = ("Forty")
return theirscore(op_score)
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment