New Year Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Free and Premium WGU Scripting-and-Programming-Foundations Dumps Questions Answers

WGU Scripting and Programming Foundations Exam Questions and Answers

Question 1

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

Options:

A.

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

B.

The language is optimized for recursive programming.

C.

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

D.

The language treats programs as evaluating mathematical functions.

Buy Now
Question 2

What is an example of an algorithm?

Options:

A.

The list contains apples bananas, and oranges

B.

A webpage uses an HTML file type

C.

The sign of two integers determines the sign of the product

D.

Unplug the device, wait 30 seconds, and restart the device.

Question 3

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

Question 4

A sample function is shown:

What is returned for F (3)?

Options:

A.

12

B.

4

C.

-20

D.

-5

Question 5

What is the out of the given pseudocode?

Options:

A.

6

B.

12

C.

15

D.

18

Question 6

What does a function definition consist of?

Options:

A.

The function's argument values

B.

An invocation of a function's name

C.

A list of all other functions that call the function

D.

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

Question 7

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

Question 8

Which phase of a waterfall approach defines specifies on how to build a program?

Options:

A.

Analysis

B.

Implementation

C.

Design

D.

Testing

Question 9

Which snippet represents the loop condition expression in the given code?

Options:

A.

Integer f = 1

B.

Put f to output

C.

F < 27

D.

F = f + 2

Question 10

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.

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

B.

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

C.

Writing the code for five new capabilities

D.

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

Question 11

What is the loop variable update statement in the following code?

Options:

A.

Put j to output

B.

Integer j = -1

C.

J < 24

D.

J = j + 3

Question 12

A sequence diagram is shown:

What is the purpose of a sequence diagram?

Options:

A.

It depicts program operations, branches, and loops.

B.

It outlines the needed computations.

C.

It illustrates the communication steps for a particular software scenario.

D.

It outlines the potential actions of a user

Question 13

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

Question 14

An algorithm to calculate the positive difference in two given values, x and y, uses the steps shown.

What are the two steps of the algorithm that need to be switched to result in success?

Options:

A.

1 and 2

B.

2 and 4

C.

1 and 4

D.

3 and 4

Question 15

What is an advantage of using a programming library?

Options:

A.

There is improved programmer productivity.

B.

Static program elements are visualized.

C.

There are more statements in a user’s main function

D.

Programs need not run to yield results.

Question 16

Which kind of language is HTML?

Options:

A.

Markup

B.

Object-oriented

C.

Statically typed

D.

Dynamically typed

Question 17

A program adds a service fee to the total cost of concert tickets when the tickets are printed and mailed to customers. Another service fee is also added if the

Options:

A.

Multiple if statements

B.

If statement

C.

While loop

D.

Do-while loop

Question 18

Which characteristic distinguishes a markup language from other languages

Options:

A.

It supports decomposing programs into custom types that often combine with other variable types into more complicated concepts.

B.

It does not perform complex algorithms, but instead describes the content and formatting of webpages and other documents.

C.

It allows variables to change type during execution

D.

It requires fewer variables and variable conversions than other languages because the types can change during execution

Question 19

What are two examples of equality operators?

Choose 2 answers

Options:

A.

!=

B.

==

C.

-

D.

/

E.

<=

F.

not

Question 20

cc

What is the output of the given flowchart if the input is 54?

Options:

A.

55

B.

56

C.

58

D.

60

Question 21

A team of programmers describes the objects and functions in a program that compresses files before splitting the objects.

Which two waterfall approach phases are involved?

Options:

A.

Analysis and implementation

B.

Design and testing

C.

Implementation and testing

D.

Design and implementation

Question 22

Which two operators can be used for checking divisibility of a number?

Choose 2 answers.

Options:

A.

^

B.

*

C.

+

D.

$

E.

/

F.

%

Question 23

Which two statements describe advantages to using programming libraries?

Options:

A.

Using a library minimizes copyright issues in coding

B.

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

C.

Using libraries turns procedural code into object-oriented code.

D.

Libraries always make code run faster.

E.

The programmer can improve productivity by using libraries.

F.

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

Question 24

What is the agile phase that results in a list of objects to be written?

Options:

A.

Design

B.

Testing

C.

Implementation

D.

Analysis

Question 25

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 the coordinates of five positions, what is the most fuel-efficient flight pain?

C.

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

D.

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

Question 26

A software engineer has written a program that uses a large number of interacting custom data types information hiding, data abstraction encapsulation polymorphism, and inheritance Variables do not need to receive their types ahead of time, and this program can run on a variety of operating systems without having to re-compile the program into machine code.

Which type of language is being used? Choose 3 terms that accurately describe the language.

Options:

A.

Markup

B.

Interpreted

C.

Object-oriented

D.

Procedural

E.

Dynamic

F.

Static

Question 27

A programmer is writing a simu-lation for a physical experiment. Which phase of the agile approach is being carried writing new procedural code and eliminating certain function calls?

Options:

A.

Testing

B.

Design

C.

Implementation

D.

Analysis