#Golf scores record the number of strokes used to get teh ball in the hole
# The expected number of strokes varies from hole to hole and is called par(possible values: 3,4,5) Each score's name is based on the actual strokes
# taken compared to par:
# "Eagle": number of strokes is two less than par
# "Birdie": number of strokes is one less than par
# "Par": number of strokes equals par
#"Bogey": number of strokes is one more than par
#Given two integers that represent the number of strokes used and par, write a program that prints the appropriate score name.
# Print "Error" at the end of the output if par is not 3,4,5 or if the score's name is not "Eagle", "Birdie", "Par",or "Bogey"
# Code practice ----------------------------------------------------------------------------------------------------------------
# Get the number of strokes from user
strokes= int(input())
#Get the number of par from user
par = int(input())
#Write an if/else statement for the possible par values inputed by user
if par not in (3,4,5):
score = "Error"
#Write an if/else statement for "Eagle" == Par-2
elif strokes == par -2:
score = "Eagle:
#Write an if/else statement for "Birdie" == Par -1
elif strokes == par -1:
score = "Birdie"
#Write an if/else statement "par" == par
elif strokes == par:
score = "Par"
#Write an if/else statement for "Boget = par + 1"
elif strokes = par + 1:
score = "Bogey"
else:
score = "Error"
#print error statement if par is not 3,4,5
print(f'Par {par} in {strokes} strokes is {score}')
To embed this project on your website, copy the following code and paste it into your website's HTML: