Skip to content
Pass Any WGU OA Exam Now & Pay After You Pass. Contact Us!
  1. Home
  2. WGU Exams
  3. WGU D278
  4. Set 4
WGU D278 · Scripting and Programming Foundations

WGU D278 Practice Questions – Set 4

50 multiple-choice questions with answers and detailed explanations. Untimed — choose an answer to check it instantly.

Question 1 of 50

What is a variable in programming?

Question 2 of 50

What is a constant?

Question 3 of 50

Which data type would best store a person's age in whole years?

Question 4 of 50

Which data type stores true or false values?

Question 5 of 50

What is a string data type used for?

Question 6 of 50

What does the assignment operator (=) do in most languages?

Question 7 of 50

Which operator tests for equality in most programming languages?

Question 8 of 50

What does the modulus operator (%) return?

Question 9 of 50

What is the result of 17 % 5?

Question 10 of 50

What does the logical AND operator require to evaluate as true?

Question 11 of 50

What does the logical OR operator require to evaluate as true?

Question 12 of 50

What does the logical NOT operator do?

Question 13 of 50

What is the purpose of an if statement?

Question 14 of 50

What does an else clause do?

Question 15 of 50

What is the purpose of an else-if (elif) clause?

Question 16 of 50

What is a switch or case statement used for?

Question 17 of 50

What is a loop in programming?

Question 18 of 50

When is a for loop most appropriate?

Question 19 of 50

When is a while loop most appropriate?

Question 20 of 50

What is an infinite loop?

Question 21 of 50

What does a break statement do inside a loop?

Question 22 of 50

What does a continue statement do inside a loop?

Question 23 of 50

What is a nested loop?

Question 24 of 50

What is pseudocode?

Question 25 of 50

What is an algorithm?

Question 26 of 50

What is a flowchart used for?

Question 27 of 50

In a flowchart, what does a diamond shape typically represent?

Question 28 of 50

What is a syntax error?

Question 29 of 50

What is a logic error?

Question 30 of 50

What is a runtime error?

Question 31 of 50

What is debugging?

Question 32 of 50

What is a breakpoint in a debugger?

Question 33 of 50

What is the purpose of comments in source code?

Question 34 of 50

What is the difference between a compiler and an interpreter?

Question 35 of 50

What is variable scope?

Question 36 of 50

What is a local variable?

Question 37 of 50

What is a global variable?

Question 38 of 50

What is type casting or type conversion?

Question 39 of 50

What happens when an integer is divided by another integer in many languages?

Question 40 of 50

What is operator precedence?

Question 41 of 50

How can you control the order of evaluation in an expression?

Question 42 of 50

What is user input in a program?

Question 43 of 50

Why is input validation important?

Question 44 of 50

What is concatenation of strings?

Question 45 of 50

What does an index of 0 typically refer to in an array?

Question 46 of 50

What is an off-by-one error?

Question 47 of 50

What is initialization of a variable?

Question 48 of 50

What is an accumulator variable typically used for?

Question 49 of 50

What is a counter variable in a loop?

Question 50 of 50

What is the primary benefit of using meaningful variable names?

Set 4 complete

You scored 0%

0 correct out of 0 answered (50 questions in this set).

Next: Set 5

Struggling with WGU D278?

If this exam is giving you a hard time, let us be your helping hand. Contact us, and we'll provide the assistance you need to pass and move forward.

Chat Now