Summer Certification Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: validbest

Pass the WGU Courses and Certificates Scripting-and-Programming-Foundations Questions and answers with ValidTests

Exam Scripting-and-Programming-Foundations All Questions
Exam Scripting-and-Programming-Foundations Premium Access

View all detail and faqs for the Scripting-and-Programming-Foundations exam

Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions
Questions # 31:

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

Options:

A.

When the user inputs a number, the program outputs "True" when the number is a multiple of 10.

B.

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.

C.

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

D.

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

Expert Solution
Questions # 32:

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

Expert Solution
Questions # 33:

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

Expert Solution
Questions # 34:

What is an example of an algorithm?

Options:

A.

The sign of two integers determines the sign of the product.

B.

The list contains apples, bananas, and oranges.

C.

A webpage uses an HTML file type.

D.

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

Expert Solution
Questions # 35:

What is put to output by the following flowchart, if the input is 3.5?

Question # 35

Options:

A.

Backlog

B.

Interview

C.

Return

D.

interviewBacking

Expert Solution
Questions # 36:

Which characteristic specifically describes an object-oriented language?

Options:

A.

Supports creating programs as items that have data plus operations.

B.

Supports creating programs as a set of functions.

C.

Requires a compiler to translate to machine code.

D.

Can be run on any machine that has an interpreter.

Expert Solution
Questions # 37:

A sample function is shown.

Y = -2 ‘’ x - 2

What is returned for f(-1)?

Options:

A.

-3

B.

0

C.

2

D.

6

Expert Solution
Questions # 38:

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

Expert Solution
Questions # 39:

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

Expert Solution
Questions # 40:

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

Expert Solution
Viewing page 4 out of 5 pages
Viewing questions 31-40 out of questions