Month End Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70special

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
$37.5  $124.99

PDF Study Guide

  • Product Type: PDF Study Guide
$33  $109.99
Question 1

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````````````````````

Question 2

What would a string be used to store?

Options:

A.

A true/false indication of whether a number is composite.

B.

A positive number between 2 and 3.

C.

The word "positive."

D.

A positive whole number.

Question 3

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 4

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

Question 5

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 6

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 7

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 8

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:

Question 9

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

Question 10

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.

Question 11

Which expression has a value equal to the rightmost digit of the integer q = 7777?

Options:

A.

10 % q

B.

q % 10

C.

q / 10000

D.

q % 10000

Question 12

An algorithm should output "OK" if a number is between 98.3 and 98.9, else the output is "Not OK." Which test is a valid test of the algorithm?

Options:

A.

Input 98.6. Ensure output is "Not OK."

B.

Input 98.6. Ensure output is "OK."

C.

Input 99.9. Ensure output is "OK."

D.

Input 99.9. Ensure output is "98.9."

Question 13

What are two example of valid function calls?

Choose 2 answers.

Options:

A.

round_number(4.723, 2)

B.

convort_value(12) returns cVa1

C.

Printsample()

D.

CountFactors(96 integer)

E.

function Sample (float 2.0)

F.

GetHeight(integer 3, integer 4)

Question 14

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 15

Which value would require an integer as a data type?

Options:

A.

The cost of a dinner including tax and tip.

B.

An approximation of the number pi to five decimal places.

C.

The weights of every patient involved in a pharmaceutical trial.

D.

The number of students in a section.

Question 16

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 17

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 18

What is a feature of CM as a programming language

Options:

A.

The code must be compiled into machine code in the form of an executable file before execution.

B.

The program usually runs slower than an interpreted language.

C.

The code runs directly one statement at a time by another program called a compiler

D.

The code does not require being translated into machine code but can be run by a separate program called a compiler.

Question 19

What is a feature of a compiled programming language?

Options:

A.

The program usually runs slower than an interpreted language.

B.

The code runs directly one statement at a time by another program called a compiler.

C.

The code must be compiled into machine code in the form of an executable file before execution.

D.

The code does not require being translated into machine code but can be run by a separate program called a compiler.

Question 20

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

    Measure and mark the lumber cuts that need to be made.

    Buy the needed materials.

    Determine the needed materials.

    Cut the lumber to the proper dimensions.

    Assemble the pieces and paint.Which two steps of the algorithm should be switched to make the algorithm successful?

Options:

A.

1 and 3

B.

1 and 2

C.

2 and 3

D.

2 and 4

Question 21

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.

Options:

A.

Analysis and implementation

B.

Analysis and design

C.

Design and implementation

D.

Design and testing

Question 22

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

Options:

A.

-15

B.

-11

C.

-8

D.

9

Question 23

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

Options:

A.

Markup

B.

Compiled

C.

Interpreted

D.

Machine code

Question 24

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 25

Which characteristic specifically describes an object-oriented language?

Options:

A.

Supports creating programs as a set of functions

B.

Requires a compiler to convert to machine code

C.

Can be run on any machine that has an interpreter

D.

Supports creating program as item that have data plus operations

Question 26

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

Options:

A.

Testing

B.

Analysis

C.

Design

D.

Implementation

Question 27

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

Question 28

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

Question 29

What is the out of the given pseudocode?

Options:

A.

6

B.

12

C.

15

D.

18

Question 30

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

Options:

A.

Variable float gpa

B.

Constant float gpa

C.

Variable int gpa

D.

Constant int gpa

Question 31

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 32

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 33

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 34

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 35

One requirement for the language of a protect is that it is based on a series of method calls.

When type of language is characterized in this way?

Options:

A.

Static

B.

Compiled

C.

Functional

D.

Markup

Question 36

Which output results from the given algorithm?

Options:

A.

1

B.

5

C.

10

D.

60

Question 37

The steps in an algorithm to buy a pair of shoes from a store are given in no particular order.

* Bring the shoes to the cashier

* Pay for the shoes

* Enter the store

* Select the pair of shoes

What is the first step of the algorithm?

Options:

A.

Select the pair of shoes.

B.

Bring the shoes to the cashier.

C.

Enter the store

D.

Pay for the shoes.

Question 38

Which kind of languages are C and Java?

Options:

A.

Machine code

B.

Compiled

C.

Interpreted

D.

Markup

Question 39

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 40

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 41

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