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