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
FIRST PERSON TO FINISH GETS BRAINLIST
ivanzaharov [21]
1. D

2. D

3. ?

4. False

5. True

3 0
3 years ago
Characteristics of 1st generation​ computers
jasenka [17]

Answer:

use of vacume tubes to make circuit

use of punch cards as I/O devices

use of high electricity

use of magnetic drums

use of machine language and symbols in instuctons

4 0
2 years ago
Strlen("seven"); what is the output?
Leokris [45]

Answer:

A is your answer hope this helps

4 0
3 years ago
Write and test a Python program to find and print the smallest number in a set of integer numbers. The program should read input
NikAS [45]

Answer:

numbers = []

count = 0

while True:

   number = int(input("Enter a number: "))

   if number < 0:

       break

   else:

       numbers.append(number)

       count += 1

min_number = min(numbers)  

print(str(min_number) + " was the smallest among " + str(count) + " entered numbers.")

Explanation:

Initialize an empty array, to hold the entered numbers, and count as 0

Create a while loop that iterates until a specific condition is met

Inside the loop, ask the user to enter the numbers. When the user enters a negative number terminate the loop. Otherwise, add the entered number to the numbers array and increment the count by 1.

When the loop is done, find the smallest of the number in the numbers array using min method and assign it to the min_number.

Print the min_number and count

6 0
2 years ago
Describe the concept of a cursor and how it is used in embedded SQL.
Korvikt [17]

Answer:

Cursor is the temporary area created when the SQL statement is executed.

Explanation:

Data base management system allows

 Entering Data

 Housekeeping

 Querying data

 Printing reports

Cursor contains the information about the selected statement and the rows data accessed by it. This space is used to store the data retrieve from data base    

A cursor is used to get rows from the query that has many rows in its result sets a cursor is work as a handle and identifier in SQL query. it is very necessary in SQL because it is an object which is used to store the output of query.

A cursor is used to retrieve rows from a query that has multiple rows in its result set. A cursor is a handle or an identifier for the SQL query and a position within the result set.  

7 0
3 years ago
Other questions:
  • A good reference point for determining the position of a line or curb in front of you is your __________ . A. Hood ornament B. L
    10·1 answer
  • Which of the following documents cannot be created using the Microsoft® Word® application?
    5·2 answers
  • Many programmers today use a(n) _________, which is software that helps them build their computer programs. eula cad sdlc ide
    15·1 answer
  • You company hired you to build a network. List of technical question that you will ask?
    11·1 answer
  • The definition of network is:
    10·1 answer
  • Blending two or more colours is called​
    6·1 answer
  • 1. A truck leaves a stop sign and accelerates uniformly over a time of 5.21 seconds for a
    10·1 answer
  • Var1 = 1<br> var2 = 2<br> var3 = "3"<br> print(var1 + var2 + var3)
    5·1 answer
  • Match the data type to the given data.
    7·1 answer
  • Who was the father of computer?????​
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!