1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Free_Kalibri [48]
3 years ago
5

Golf scores record the number of strokes used to get the ball in the hole. The expected number of strokes varies from hole to ho

le and is called par (i.e. 3, 4, or 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 par and the number of strokes used, write a program that prints the appropriate score name. Print "Error" if par is not 3, 4, or 5.

Ex: If the input is:
4
3
Computers and Technology
1 answer:
Kobotan [32]3 years ago
7 0

The program is an illustration of if conditional statement. The programming language is not stated; so, I will answer the question using Python.

The program in Python where comments are used to explain each line is as follows:

<em>#This initializes the scores</em>

scores = ["Eagle","Birdle","Par","Bogey"]

<em>#This gets input for par</em>

par = int(input())

<em>#This gets input for stroke</em>

stroke = int(input())

<em>#This checks if par and stroke are between 3 and 5 (inclusive)</em>

if (par >=3 and par <= 5) or (stroke >=3 and stroke <= 5):

<em>#This calculates the difference between par and stroke</em>

   diff = stroke - par  + 2

<em>#This prints the corresponding score</em>

   print(scores[diff])

<em>#If par or stroke is out of range of 3 and 5</em>

else:

<em>#This prints error</em>

   print("Error")

<em>#At the end of the program, the appropriate score is printed.</em>

See attachment for the program source code and the sample run

Read more about python programs at:

brainly.com/question/16917190

You might be interested in
Write a program that uses a structure to store the following data about a customer account: Name Address City, State, and ZIP Te
zheka24 [161]

Answer:

Don't know

Explanation:

4 0
2 years ago
GenXTech is a growing company that develops gaming applications for military simulations and commercial clients. As part of its
rodikova [14]

Answer:

enterprise architecture

Explanation:

Based on the information provided within the question it can be said that in this scenario GenXTech seems to be creating an enterprise architecture. This is a blueprint that completely detail the structure and different operations within an organization, with the main focus of how the organization can best achieve it's objective. Which is what GenXTech is trying to do by analyzing it's situation.

4 0
3 years ago
PV = 11,000 AC = 6000 CV = 4,000. What is SV? What does this calculation tell you?
pogonyaev

Answer:

I don't see an SV in the examples.. I suspect these are the name plate numbers off of a transformer... but.. more context would really help

Explanation:

8 0
3 years ago
All who are interested in forex trading and bitcoin mining follow me for account management to all who are busy with work so i c
masya89 [10]

I am very interested but too young just 10

8 0
3 years ago
Juan is a network administrator and must set up a VPN for his company's network. To allow safe communication, he should
Mekhanik [1.2K]

Answer:

select Control Panel, then Network Protocols, then Internet

4 0
2 years ago
Other questions:
  • When looking through the documentation for a specific class, you never actually see the source code for that class. Instead, you
    6·1 answer
  • What is the meaning for science?
    14·1 answer
  • Nvm, Its B.
    10·1 answer
  • Which term is used to describe a password-protected, encrypted data file that verifies the identity of the sender of a message?
    8·1 answer
  • In computer logic what is order of instructions
    13·1 answer
  • Kim would like to have a simple method for entering data into a database. She should create a _____.
    14·2 answers
  • Write a program to read a list of exam scores given as integer percentages in the range 0-100. Display the total number of grade
    10·1 answer
  • Which of the following is a sample IPv4 address?
    14·1 answer
  • 2. Discuss CORBA functions<br><br>​
    6·2 answers
  • Where do you interact with databases on a daily basis?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!