New Year Special Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

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

Page: 1 / 9
Total 90 questions

WGU Scripting and Programming Foundations Exam Questions and Answers

Question 1

Which data type should be used to hold the value of a person's body temperature in Fahrenheit

Options:

A.

Boolean

B.

Integer

C.

String

D.

Float

Question 2

Which output results from the given algorithm?

Question # 2

Options:

A.

1

B.

5

C.

10

D.

60

Question 3

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 4

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

Question 5

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

Question # 5

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 6

Which kind of languages are C, C++ and Java?

Options:

A.

Markup

B.

Compiled

C.

Interpreted

D.

Machine code

Question 7

What does the following algorithm determine?

Question # 7

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 8

Given integer x = 12 and integer y = 4

What is the value of the expression x + y12?

Options:

A.

6

B.

8

C.

14

Question 9

A sample function is shown.

Y = -2 ‘’ x - 2

What is returned for f(-1)?

Options:

A.

-3

B.

0

C.

2

D.

6

Question 10

Consider the given function.

Question # 10

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 11

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

Question 12

Which statement describes a compiled language?

Options:

A.

It runs one statement at a time by another program without the need for compilation.

B.

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

C.

It can be run right away without converting the code into an executable file.

D.

It has code that is first converted to an executable file, and then run on a particular type of machine.

Question 13

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

Options:

A.

/

B.

$

C.

| |

D.

+

Question 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

Question 15

Which expression evaluates to 14 if integer y = 13?

Options:

A.

11 + y % 5

B.

11 - y / 5.0

C.

(11 + y) % 5

D.

11.0 - y / 5

Question 16

Which language has extensive support for object-oriented programming?

Options:

A.

Markup

B.

HTML

C.

C

D.

C++

Question 17

A programmer has been hired to create an inventory system for the books in a library. What is the waterfall phase in which waterfall outlining all the functions that need to be written to support the inventory system?

Options:

A.

Implementation

B.

Testing

C.

Analysis

D.

Design

Question 18

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 19

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

Question # 19

Options:

A.

5.0

B.

6.0

C.

6.1

D.

8.4

Question 20

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 21

What is the proper way to declare a student's grade point average throughout the term it this item is needed in several places in a program?

Options:

A.

variable int gpa

B.

constant float gpa

C.

constant int gpa

D.

variable float gpa

Question 22

The steps in an algorithm to find the maximum of integers a and b are given.

Question # 22

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

Options:

A.

2 and 4

B.

2 and 3

C.

1 and 2

D.

1 and 3

Question 23

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

Options:

A.

Analysis

B.

Implementation

C.

Design

D.

Testing

Question 24

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

Question 25

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 26

What is an argument?

Options:

A.

A piece of information provided in a function call

B.

A declared piece of information within a function

C.

A piece of information assigned to a function's output

D.

An input named in the definition of a function

Question 27

What is the purpose of an activity diagram, such as the following diagram?

Question # 27

Options:

A.

Describes the execution flow of the PrintPositive activity

B.

Specifics the program’s components that must be present

C.

Visualizes the program's data values

D.

Specifies the program's behavioral requirements

Page: 1 / 9
Total 90 questions