(Western Governors University) – Final Exam Verified
Q & A Compilation
Introduction:
This document contains the complete set of verified questions and
answers for the WGU D278 Scripting and Programming Foundations
final exam. It covers core programming concepts including variables,
data types, loops, control structures, arrays, and functions.
Additionally, it explains principles of object-oriented programming,
software development life cycles (SDLC), and distinctions between
compiled, interpreted, and markup languages. The material provides
a comprehensive and accurate reference for WGU D278 exam
preparation and review.
Exam Questions and Answers
47. A company has a new project it wishes to implement to track
and analyze employee and customer interactions. The company
leadership determines that the system should support direct data
entry as well as automated data capture of phone calls and emails.
Which phase of the waterfall process is occurring?--- correct
answer --- Analysis
48. A programmer shows a program's first version to a customer.
The customer provides feedback, which causes the programmer to
change the goals of the program.
,In which phase of an agile approach are goals changed based on
customer feedback?--- correct answer --- Analysis
49. A programmer shows a program's first version to a customer.
Based on feedback, the programmer begins writing a second version
of the program. In which phase of an agile approach does the
writing of a second version of the program occur?--- correct
answer --- Implementation
50. A programmer shows a program's first version to a customer.
Based on feedback, the programmer creates a second version, and
then has a colleague run the second version on numerous inputs to
ensure outputs are correct. Which phase of an agile approach is that
colleague carrying out?--- correct answer --- Testing
51. A programmer is currently programming the fourth version of
a program. Each version has additional features to satisfy more
customers.
In which phase of an agile approach does the programming of the
fourth version occur?--- correct answer --- Implementation
52. What does a programmer do first to use an existing
programming library?-
--- correct answer --- Include the library
53. What relationship is common among a programming library's
functions?--- correct answer --- -
Functions all relate to the same purpose
54. What is an advantage of using a programming library?---
correct answer --- The code has already been tested
,55. Which language is dynamically typed?--- correct answer ---
Python
56. Which language is not built on object-oriented design
principles?--- correct answer --- C
57. A language substantially supports a programmer creating
items like person, teacher, and students. Each item has internal
data and some operations. Which characteristic describes that
language?--- correct answer --- Object-oriented
58. A programmer wants a compiler to report an error if an
integer variable is assigned with a string.
Which kind of language should the programmer use?--- correct
answer --- Statically typed
59. A language uses tags around text to indicate how that text
should be format- ted.
Which characteristic describes a language having such tags?---
correct answer --- Markup
60. What is a characteristic of a compiled language?--- correct
answer --- Converts to machine language before running
61. What is a characteristic of an interpreted language?--- correct
answer --- Runs easily on ditterent kinds of machines
62. What is an advantage of interpreted programs?--- correct
answer --- They can be modified at run time
63. Which characteristic specifically describes a markup
language?--- correct answer --- Tags surround text to describe
desired formatting
, 64. Which characteristic specifically describes interpreted
languages?--- correct answer --- They can be run one statement at a
time
1. Which operator should be used to determine if a number is
evenly divisible by 5?--- correct answer --- %
2. A car drove 200 miles using 10 gallons of fuel.
Which operation should be used to compute the miles per gallon,
which is 20?--- correct answer --- Division
3. A variable should hold a person's height in meters. Which data
type should the variable be?--- correct answer --- Float
4. A variable should hold the names of all past U.S. presidents.
Which data type should the variable be?--- correct answer --- String
array
5. 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 de- clared?--- correct answer --- Constant integer
secondsPerMinute
6. A program determines if a user's age is high enough to run for
U.S. president. The minimum age requirement is 35.
How should the item that holds the minimum age be declared?---
correct answer --- Constant integer minAge
7. Given integer x = 3 and integer y = 5.
What is the value of the expression ( x / 2.0) + y?--- correct answer
--- 6.5
8. Given float x = 10.2 and float y = 1.0.