WGU D278 SCRIPTING AND
PROGRAMMING FOUNDATIONS | OA|
OBJECTIVE ASSESSMENT EXAM
QUESTIONS AND ANSWERS | LATEST
UPDATE 2026|| GUARANTEED PASS
What does a programmer do first to use an existing programming library?
Include the library.
What relationship is common among a programming library's functions?
Functions all relate to the same purpose.
What is an advantage of using a programming library?
The code has already been tested.
Which language is dynamically typed?
Python.
Which language is not built on object-oriented design principles?
C.
Which characteristic describes a language that supports creating items with
internal data and operations?
Object-oriented.
Which kind of language should a programmer use to report an error if an integer
variable is assigned a string?
Statically typed.
Which characteristic describes a markup language?
,Tags surround text to indicate formatting.
What is a characteristic of a compiled language?
Converts to machine language before running.
What is a characteristic of an interpreted language?
Runs easily on different kinds of machines.
What is an advantage of interpreted programs?
They can be modified at run time.
Which characteristic specifically describes interpreted languages?
They can run one statement at a time.
Which operation should be used to compute miles per gallon from 200 miles and
10 gallons?
Division.
Which operator determines if a number is evenly divisible by 5?
The modulus operator (%).
Which data type should hold a person's height in meters?
Float.
Which data type should hold the names of all past U.S. presidents?
String array.
How should the item that holds the number of seconds in a minute be declared?
Constant integer secondsPerMinute.
How should the item that holds the minimum age to run for U.S. president be
declared?
Constant integer minAge.
, What is the value of the expression (x / 2.0) + y when x = 3 and y = 5?
6.0.
What is the value of the expression x / y when x = 10.2 and y = 1.0?
10.2.
What kind of operator is == in the expression i == 20?
Equality.
What is the purpose of parentheses () in a programming expression?
To group expressions.
Which expression evaluates to 2.0 when x = 3.0?
x / 3 * 2 + 2.
Which expression represents all the values of x when x is the age ranging from 18
to 24 years old?
(x >= 18) and (x <= 24).
Which data type is used for items that are measured in length?
Float.
Which data type should be used to keep track of how many planes are in a
hangar?
Integer.
What should be the input to a function that converts hours and minutes to
seconds?
Hours and minutes.
What should be the input to a function that returns a number x cubed?
x.
PROGRAMMING FOUNDATIONS | OA|
OBJECTIVE ASSESSMENT EXAM
QUESTIONS AND ANSWERS | LATEST
UPDATE 2026|| GUARANTEED PASS
What does a programmer do first to use an existing programming library?
Include the library.
What relationship is common among a programming library's functions?
Functions all relate to the same purpose.
What is an advantage of using a programming library?
The code has already been tested.
Which language is dynamically typed?
Python.
Which language is not built on object-oriented design principles?
C.
Which characteristic describes a language that supports creating items with
internal data and operations?
Object-oriented.
Which kind of language should a programmer use to report an error if an integer
variable is assigned a string?
Statically typed.
Which characteristic describes a markup language?
,Tags surround text to indicate formatting.
What is a characteristic of a compiled language?
Converts to machine language before running.
What is a characteristic of an interpreted language?
Runs easily on different kinds of machines.
What is an advantage of interpreted programs?
They can be modified at run time.
Which characteristic specifically describes interpreted languages?
They can run one statement at a time.
Which operation should be used to compute miles per gallon from 200 miles and
10 gallons?
Division.
Which operator determines if a number is evenly divisible by 5?
The modulus operator (%).
Which data type should hold a person's height in meters?
Float.
Which data type should hold the names of all past U.S. presidents?
String array.
How should the item that holds the number of seconds in a minute be declared?
Constant integer secondsPerMinute.
How should the item that holds the minimum age to run for U.S. president be
declared?
Constant integer minAge.
, What is the value of the expression (x / 2.0) + y when x = 3 and y = 5?
6.0.
What is the value of the expression x / y when x = 10.2 and y = 1.0?
10.2.
What kind of operator is == in the expression i == 20?
Equality.
What is the purpose of parentheses () in a programming expression?
To group expressions.
Which expression evaluates to 2.0 when x = 3.0?
x / 3 * 2 + 2.
Which expression represents all the values of x when x is the age ranging from 18
to 24 years old?
(x >= 18) and (x <= 24).
Which data type is used for items that are measured in length?
Float.
Which data type should be used to keep track of how many planes are in a
hangar?
Integer.
What should be the input to a function that converts hours and minutes to
seconds?
Hours and minutes.
What should be the input to a function that returns a number x cubed?
x.