WGU D278
WGU D278 Objective Assessment | 70 Questions and Answers |
2026 Update | 100% Correct.
Testbankscove
➢
➢
➢
➢
,Question 1
Given float x = 10.2 and float y = 1.0 . What is the value of the expression x / y ?
A) 10
B) 0.0
C) 1.0
D) 10.2
Correct Answer: D
Rationale: Division of two floats preserves decimal precision. 10..0 = 10.2.
Question 2
A function calculates the weight difference (Diff) given two sample weights (S1 and S2).
What should be the output from the function?
A) S2 only
B) S1 only
C) Diff
D) S1 and S2
Correct Answer: C
Rationale: The functionʼs purpose is to return the calculated difference, not the inputs.
Question 3
A function returns a number x cubed. What should be the input to the function?
A) X, X, X
B) 27
C) X
D) X, X
Correct Answer: C
Rationale: The function needs only the number to be cubed as input.
, Question 4
Which text represents an algorithm?
A) Insert key, turn key, open door.
B) A box has balls, bats, and hats.
C) The forecast for tomorrow is rain.
D) Cats and dogs have tails.
Correct Answer: A
Rationale: An algorithm is a step-by-step procedure. Option A describes sequential
actions.
Question 5
Which phase of an agile approach would create an executable program?
A) Implementation
B) Analysis
C) Design
D) Testing
Correct Answer: A
Rationale: Implementation is the coding phase where an executable program is
produced.
Question 6
A program uses the number of seconds in a minute in various calculations. How should
the item that holds the number of seconds in a minute be declared?
A) Constant integer secondsPerMinute
B) Constant float userTime
C) Variable integer secondsPerMinute
D) Variable float userTime
Correct Answer: A
Rationale: Seconds per minute never changes, so it should be a constant integer.
WGU D278 Objective Assessment | 70 Questions and Answers |
2026 Update | 100% Correct.
Testbankscove
➢
➢
➢
➢
,Question 1
Given float x = 10.2 and float y = 1.0 . What is the value of the expression x / y ?
A) 10
B) 0.0
C) 1.0
D) 10.2
Correct Answer: D
Rationale: Division of two floats preserves decimal precision. 10..0 = 10.2.
Question 2
A function calculates the weight difference (Diff) given two sample weights (S1 and S2).
What should be the output from the function?
A) S2 only
B) S1 only
C) Diff
D) S1 and S2
Correct Answer: C
Rationale: The functionʼs purpose is to return the calculated difference, not the inputs.
Question 3
A function returns a number x cubed. What should be the input to the function?
A) X, X, X
B) 27
C) X
D) X, X
Correct Answer: C
Rationale: The function needs only the number to be cubed as input.
, Question 4
Which text represents an algorithm?
A) Insert key, turn key, open door.
B) A box has balls, bats, and hats.
C) The forecast for tomorrow is rain.
D) Cats and dogs have tails.
Correct Answer: A
Rationale: An algorithm is a step-by-step procedure. Option A describes sequential
actions.
Question 5
Which phase of an agile approach would create an executable program?
A) Implementation
B) Analysis
C) Design
D) Testing
Correct Answer: A
Rationale: Implementation is the coding phase where an executable program is
produced.
Question 6
A program uses the number of seconds in a minute in various calculations. How should
the item that holds the number of seconds in a minute be declared?
A) Constant integer secondsPerMinute
B) Constant float userTime
C) Variable integer secondsPerMinute
D) Variable float userTime
Correct Answer: A
Rationale: Seconds per minute never changes, so it should be a constant integer.