Skip to content

Instantly share code, notes, and snippets.

@Xe
Forked from anonymous/gist:7034363
Created October 17, 2013 23:56
Show Gist options
  • Save Xe/7034378 to your computer and use it in GitHub Desktop.
Save Xe/7034378 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