Weekend Sale Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: suredis

WGU Scripting-and-Programming-Foundations WGU Scripting and Programming Foundations Exam Exam Practice Test

WGU Scripting and Programming Foundations Exam Questions and Answers

Testing Engine

  • Product Type: Testing Engine
$42  $119.99

PDF Study Guide

  • Product Type: PDF Study Guide
$36.75  $104.99
Question 1

A programmer is writing code using C. Which paradigm could the programmer be using?

Options:

A.

A procedural paradigm using dynamic types

B.

A procedural paradigm using sialic types

C.

A functional paradigm using dynamic types

D.

An event-driven paradigm using static types

Question 2

The steps in an algorithm to calculate the positive difference in two given values, x and y, are given in no particular order:

What is the first step of the algorithm?

Options:

A.

Set Diff = x - y

B.

Put Diff to output

C.

Deduce variable Diff

D.

If y > x, set Diff = y - x.

Question 3

A software developer determines the mathematical operations that a calculator program should support When two waterfall approach phases are involved?

Options:

A.

Design and Testing

B.

Implementation and testing

C.

Design and implementation

D.

Analysis and design

Question 4

Which phase of an agile application would create a function that calculates shipping costs based on an item’s weight and delivery zip code?

Options:

A.

Implementation

B.

Analysis

C.

Design

D.

Testing

Question 5

Which statement describes a compiled language?

Options:

A.

It is considered fairly safe because it forces the programmer lo declare all variable types ahead of time and commit to those types during runtime.

B.

It allows variables to change from the initial declared types during program execution.

C.

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

D.

It has code that is first converted to machine code, which can then only run on a particular type of machine.

Question 6

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.

Question 7

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

Options:

A.

Put h to output

B.

integer h = 2

C.

h = h + 2

D.

h < 30

Question 8

What does the following algorithm determine?

Options:

A.

Whether x is even

B.

Whether x is evenly divisible by 2 or 3

C.

Whether x is odd

D.

Whether x r> negative. 0,

Question 9

What is a string?

Options:

A.

A built-in method

B.

A very precise sequence of steps

C.

A sequence of characters

D.

A name that refers to a value

Question 10

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

Options:

A.

Analysis

B.

Implementation

C.

Design

D.

Testing

Question 11

A program allows the user to play a game. At the end of each game, the program asks the user if they want to play again.

Which programming structure on its own is appropriate to accomplish this task?

Options:

A.

Nested for loops

B.

One for loop

C.

One while loop

D.

If-else statement

Question 12

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.

Question 13

A programming loam is using the waterfall design approach to create an application. Which deliverable would be produced during the design phase?

Options:

A.

A report of customer satisfaction

B.

A list of additional features to be added during revision

C.

A written description of the goals for the project

D.

The programming paradigm to be used

Question 14

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 15

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

Options:

A.

integer h = 0

B.

h = h +1

C.

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

D.

if userInput == pwd

Question 16

cc

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

Options:

A.

55

B.

56

C.

58

D.

60

Question 17

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.

Question 18

An example of an behavioral diagram is shown.

What is generally visualized with a behavioral diagram"?

Options:

A.

Quality control mechanisms

B.

Relative sizes of program components

C.

Operating system compatibility

D.

The dynamic flow of software

Question 19

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

Question 20

Which operation should be used to check if the difference of two values is greater than 1?

Options:

A.

Multiplication

B.

Subtraction

C.

Addition

D.

Division

Question 21

Which kind of language is HTML?

Options:

A.

Markup

B.

Object-oriented

C.

Statically typed

D.

Dynamically typed

Question 22

Which action occurs the design phase of an agile process?

Options:

A.

Wring the required objects

B.

Deciding on the scope of the program

C.

Determining the goals of the project.

D.

Determining the functions that need to be written

Question 23

Which two situations would be helped by using a programming library?

Options:

A.

A programmer needs to write several interacting objects for a student gradebook application, some of which need an inheritance structure.

B.

A programming student is writing code to iterate through the integers in a list and determine the maximum.

C.

A video game programmer needs to perform several animation tasks, all of which are very common in the industry. The programmer does not want to have to code each task. And they are unsure if they a even know how lo code a few of them.

D.

A programmer needs to perform a series of file compression tasks. These tasks are commonly performed by programmers, and the programmer does not want to have to code them all by hand

E.

A programmer is developing a database application that can house various types of data. The software cannot know ahead of time the data type, and so the programmer needs variables that do not require an initial declaration type.

F.

A programmer is writing a piece of mathematical code that requires the heavy use of recursive functions.

Question 24

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 25

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 26

Which operator is helpful in determining if an integer is a multiple of another integer?

Options:

A.

/

B.

$

C.

| |

D.

+

Question 27

Which type of language requires variables to be declared ahead of time and prohibits their types from changing while the program runs?

Options:

A.

Scripted (interpreted)

B.

Procedural

C.

Static

D.

Compiled