Special New Year Discounts Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 713PS592

ExamsBrite Dumps

WGU Scripting and Programming Foundations Exam Question and Answers

WGU Scripting and Programming Foundations Exam

Last Update Sep 18, 2025
Total Questions : 138

We are offering FREE Scripting-and-Programming-Foundations WGU exam questions. All you do is to just go and sign up. Give your details, prepare Scripting-and-Programming-Foundations free exam questions and then go for complete pool of WGU Scripting and Programming Foundations Exam test questions that will help you more.

Scripting-and-Programming-Foundations pdf

Scripting-and-Programming-Foundations PDF

$42  $104.99
Scripting-and-Programming-Foundations Engine

Scripting-and-Programming-Foundations Testing Engine

$50  $124.99
Scripting-and-Programming-Foundations PDF + Engine

Scripting-and-Programming-Foundations PDF + Testing Engine

$66  $164.99
Questions 1

A programmer receives requirements from customers and deciders 1o build a first version of a program.

Which phase of an agile approach is being carried out when trio programmer starts writing the program's first version?

Options:

A.  

Testing

B.  

Implementation

C.  

Analysis

D.  

Design

Discussion 0
Questions 2

Which characteristic distinguishes an object-oriented language from other languages?

Options:

A.  

It includes custom variable types with methods, information hiding, data abstraction, encapsulation, polymorphism, and inheritance.

B.  

It is extremely portable and can be run on any machine that has a program than can read the code.

C.  

It has variables that never change type during execution

D.  

lt specifies a series of well-structured steps to compose a program.

Discussion 0
Questions 3

What is one task that could be accomplish using a while loop?

Options:

A.  

After inputting two numbers, the program prints out the larger of the two

B.  

A user is asked to enter a password repeatedly until either a correct password is entered or five incorrect attempts have been made.

C.  

When the user Inputs a number, the program outputs "True" when the number Is a multiple of 10

D.  

The user inputs an integer, and the program prints out whether the number is even or odd and whether the number Is positive, negative, or zero.

Discussion 0
Questions 4

A function should return 0 if a number, N is even and 1 if N is odd.

What should be the input to the function?

Options:

A.  

Even

B.  

1

C.  

0

D.  

N

Discussion 0
Questions 5

Which three statements describe a characteristic of a programming library?

Options:

A.  

A library typically must be included before any function in the library is used

B.  

A single library normally includes more than one function.

C.  

Using libraries will always make a program run less efficiently.

D.  

Libraries improve a programmer's productivity.

E.  

A single program can only include one library.

F.  

One library will contain one function but can have several variables.

Discussion 0
Questions 6

A particular sorting algorithm takes integer list [10, 6, 8] and incorrectly sorts the list to [6, 10, 8]. What is true about the algorithm’s correctness for sorting an arbitrary list of three integers?

Options:

A.  

The algorithm is incorrect.

B.  

The algorithm only works for [10, 6, 8].

C.  

The algorithm’s correctness is unknown.

D.  

The algorithm is correct.

Discussion 0
Questions 7

What is the outcome for the given algorithm? Round to the nearest tenth, if necessary.

Options:

A.  

5.0

B.  

6.0

C.  

6.1

D.  

8.4

Discussion 0
Questions 8

It is given that integer x=41 and integer y = 16. What is the value of the expression (x % 8) - y?

Options:

A.  

-15

B.  

-11

C.  

-8

D.  

1

Discussion 0
Questions 9

Which output results from the given algorithm?

Options:

A.  

1

B.  

5

C.  

10

D.  

60

Discussion 0
Questions 10

Which is one characteristic of an object-oriented language that is not a characteristic of a procedural or functional language?

Options:

A.  

The language is optimized for recursive programming.

B.  

The language is based on the concept of modular programming and the calling of a subroutine.

C.  

The language treats programs as evaluating mathematical functions.

D.  

The language supports decomposing a program into objects that interact with one another.

Discussion 0
Questions 11

Which two statement describe advantages to using programming libraries? Choose 2 answers

Options:

A.  

Using libraries turns procedural code into object-oriented code.

B.  

Using a library prevents a programmer from having to code common tasks by hand

C.  

A program that uses libraries is more portable than one that does not

D.  

Libraries always make code run faster.

E.  

The programmer can improve productivity by using libraries.

F.  

Using a library minimizes copyright issues in coding.

Discussion 0
Questions 12

Which output results from the given algorithm?

i = 61

d = 6

c = 0

while i >= d

c = c + 1

i = i - d

Put c to output

Options:

A.  

1

B.  

5

C.  

10

D.  

60

Discussion 0
Questions 13

Which problem is solved by Dijkstra’s shortest path algorithm?

Options:

A.  

Given an increasing array of numbers, is the number 19 in the array?

B.  

Given an alphabetized list of race entrants and a person’s name, is the person entered in the race?

C.  

Given two newspaper articles, what is the greatest sequence of words shared by both articles?

D.  

Given the coordinates of five positions, what is the most fuel-efficient flight path?

Discussion 0
Questions 14

Which term refers to a function that represents the number of fixed-size memory units used for an input of a given size?

Options:

A.  

Space complexity

B.  

Linear search

C.  

Computational complexity

D.  

Runtime

Discussion 0
Questions 15

Which action occurs during the design phase of an Agile process?

Options:

A.  

Determining the functions that need to be written

B.  

Determining the goals of the project

C.  

Writing the required objects

D.  

Deciding on the name of the program

Discussion 0
Questions 16

A software developer creates a list of all objects and functions that will be used in a board game application and then begins to write the code for each object. Which two phases of the Agile approach are being carried out?

Options:

A.  

Analysis and design

B.  

Design and implementation

C.  

Analysis and implementation

D.  

Design and testing

Discussion 0
Questions 17

A software developer determines the mathematical operations that a calculator program should support. Which two Waterfall approach phases are involved?

Options:

A.  

Analysis and design

B.  

Design and implementation

C.  

Implementation and testing

D.  

Design and testing

Discussion 0
Questions 18

A function should determine the average of x and y. What should be the function's parameters and return value(s)?

Options:

A.  

Parameters: x, y, averageReturn value: none

B.  

Parameters: x, yReturn value: average

C.  

Parameters: noneReturn values: x, y

D.  

Parameters: averageReturn values: x, y

Discussion 0
Questions 19

What is put to output by calling Greeting() twice

Options:

A.  

Hello!

B.  

Hello!Hello!

C.  

Hello!

Discussion 0
Questions 20

What is output by calling Greeting() twice?

Options:

A.  

Hello!

B.  

Hello!!

C.  

Hello!Hello!

Discussion 0
Questions 21

Which kind of languages are C and Java?

Options:

A.  

Machine code

B.  

Compiled

C.  

Interpreted

D.  

Markup

Discussion 0
Questions 22

What is a characteristic of an interpreted language?

Options:

A.  

Is restricted to running on one machine

B.  

Generates syntax errors during compilation

C.  

Can be run by a user one statement at a time

D.  

Has a programmer writing machine code

Discussion 0
Questions 23

A function determines the least common multiple (LCM) of two positive integers (a and b). What should be the input to the function?

Options:

A.  

L only

B.  

a * b

C.  

a and L

D.  

a and b

Discussion 0
Questions 24

A software team has been commissioned to create an animation application. Which event takes place during the analysis phase in the Agile approach?

Options:

A.  

Deciding that new capabilities in the animation application will be written as functions without the need for any new objects

B.  

Sending the application to customers for additional evaluation after new features are added

C.  

Deciding to add five new capabilities to the animation application based on customer feedback

D.  

Writing the code for five new capabilities

Discussion 0
Questions 25

What would a string be used to store?

Options:

A.  

A positive whole number

B.  

The word "positive"

C.  

A true/false indication of whether a number is composite

D.  

A positive number between 2 and 3

Discussion 0
Questions 26

Oder the tasks needed to safely replace a lamp's light bulb from first (1) to last (4).

Select your answer from the pull down list.

Options:

Discussion 0
Questions 27

Consider the given function:

function K(string s1, string s2)

Put s1 to output

Put " and " to output

Put s2 to output

What is the total output when K("sign", "horse") is called 2 times?

Options:

A.  

sign and horse and sign and horse

B.  

sign and horsesign and horse

C.  

sign and horse

D.  

sign and horse

E.  

sign and horse sign and horse

Discussion 0
Questions 28

Given integer x = 12 and integer y = 4. What is the value of the expression x - y * 2?

Options:

A.  

4

B.  

6

C.  

8

D.  

14

Discussion 0
Questions 29

Which expression has a values equal to the rightmost digit of the integer q = 16222?

Options:

A.  

Q / 100000

B.  

10 % q

C.  

Q % 10

D.  

Q % 10000````````````````````

Discussion 0
Questions 30

Which line is a loop variable update statement in the sample code?

integer h = 0

do

Put "What is the password?" to output

String userInput = Get next input

if userInput != pwd

Put "Incorrect." to output

h = h + 1

while (userInput != pwd) and (h <= 10)

if userInput = pwd

Put "Access granted." to output

else

Put "Access denied." to output

Options:

A.  

if userInput = pwd

B.  

h = h + 1

C.  

(userInput != pwd) and (h <= 10)

D.  

integer h = 0

Discussion 0
Questions 31

What is a characteristic of an interpreted language?

Options:

A.  

Generates syntax errors during compilation.

B.  

Can be run by a user one statement at a time.

C.  

Has a programmer writing machine code.

D.  

Is restricted to running on one machine.

Discussion 0
Questions 32

Consider the given function.

What is the total output when F (sign, horse) is called 2 times?

Options:

A.  

sign and horse sign and horse

B.  

sign and horse sign and horse

C.  

sign and horse sign and horse

D.  

sign and horse and sign and horse

Discussion 0
Questions 33

A programming is developing an application that needs to manipulation text in a variety of ways. Everything the programmer needs is standard in the industry and the programmer wants to perform these manipulations with a minimal amount of code. What does the programmer need?

Options:

A.  

An algorithm

B.  

A function

C.  

A script

D.  

A programming library

Discussion 0
Questions 34

Which snippet represents the loop variable update statement in the given code?

integer h = 7

while h < 30

Put h to output

h = h + 2

Options:

A.  

h < 30

B.  

h = h + 2

C.  

Put h to output

D.  

integer h = 7

Discussion 0
Questions 35

A team of programmers describes the objects and functions in a program that compresses files before splitting the objects. Which Waterfall approach phases are involved?

Options:

A.  

Analysis and implementation

B.  

Design and implementation

C.  

Implementation and testing

D.  

Design and testing

Discussion 0
Questions 36

The steps in an algorithm to build a picnic table are given.

1) Measure and mark the lumber cuts that need to be made

2) Buy the needed materials

3) Determine the needed materials

4) Cut the lumber to the proper dimensions

5) Assemble the pieces and paint.

Which two steps of the algorithm should be switched to make the algorithm successful?

Options:

A.  

2 and 3

B.  

1 and 3

C.  

2 and 4

D.  

1 and 2

Discussion 0
Questions 37

What does a function definition consist of?

Options:

A.  

The function’s name, inputs, outputs, and statements

B.  

A list of all other functions that call the function

C.  

An invocation of a function’s name

D.  

The function’s argument values

Discussion 0
Questions 38

Which expression evaluates to 3.7 if float x = 17.0?

Options:

A.  

X + 2 / 10

B.  

(2 + x) / 10.0

C.  

X + 2.0 / 10

D.  

2 + x / 10

Discussion 0
Questions 39

What are two examples of equality operators?

Choose 2 answers.

Options:

A.  

-

B.  

==

C.  

/

D.  

not

E.  

<=

F.  

!=

Discussion 0
Questions 40

Which two types of operators are found in the code snippet not (g != S)?

Options:

A.  

Equality and arithmetic

B.  

Assignment and arithmetic

C.  

Equality and logical

D.  

Logical and arithmetic

Discussion 0
Questions 41

Which language has extensive support for object-oriented programming?

Options:

A.  

Markup

B.  

HTML

C.  

C

D.  

C++

Discussion 0