-
-
Save Xe/7034378 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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