Search Header Logo

Abstraction in Programming (Football Program Scenario)

Authored by Mark Ross

Computers

9th Grade

Abstraction in Programming (Football Program Scenario)
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

42 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Abstraction is defined as:

The process of hiding unnecessary details and showing only essential features.

The process of converting code into machine language.

The process of writing code without any errors.

The process of compiling a program.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is an example of how abstraction could be used when developing this program?

Creating a function to handle user input without showing the internal code.

Writing all code in a single main function.

Using only global variables for all data storage.

Displaying all program details to the user at every step.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

State what is meant by a constant and give an example from the algorithm above.

A constant is a value that does not change during the execution of an algorithm; for example, 5 in the algorithm above.

A constant is a variable that can change its value during the execution of an algorithm; for example, x in the algorithm above.

A constant is a function used to repeat steps in an algorithm; for example, loop() in the algorithm above.

A constant is a type of input provided by the user; for example, userInput in the algorithm above.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

State what is meant by a variable and give an example from the algorithm above.

A variable is a named storage location in an algorithm, such as 'total' in the algorithm above.

A variable is a fixed value that cannot change, such as 5 in the algorithm above.

A variable is a type of algorithm, such as 'sort' in the algorithm above.

A variable is a step in the algorithm, such as 'start' in the algorithm above.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

State the number of goals that will be output by this algorithm for the following inputs. Wins = 30 Losses = 25

The answer cannot be determined from the image alone as the algorithm is not provided. The student is expected to explain their reasoning based on the algorithm, which is not visible in the image.

The number of goals will be 55 as it is the sum of wins and losses.

The number of goals will be 5 as it is the difference between wins and losses.

The number of goals will be 30 as it is equal to the number of wins.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

State the number of goals that will be output by this algorithm for the following inputs. Wins = 20 Losses = 5

The answer cannot be determined from the image alone as the algorithm is not provided. The student is expected to explain their reasoning based on the algorithm, which is not visible in the image.

The number of goals will be 25.

The number of goals will be 15.

The number of goals will be 0.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

A computer program calculates the correct dose in grams of a type of medicine. The algorithm used is shown by the flow diagram below. According to the flowchart, what is the dose if the patient's age is 25?

2 grams

Age * 0.1 grams

1.5 grams

Dose * 0.5 grams

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?