• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 4 out of 55 pages
Exam (elaborations)

WGU D278 Scripting and Programming Foundations Pre-Assessment Exam – Complete 270 Questions with Verified Answers.pdf

Document preview thumbnail
Preview 4 out of 55 pages

Tap on AVAILABLE IN BUNDLE / PACKAGE DEAL to unlock free bonus exams — save more while getting everything you need! You’ll be glad you did! WGU D278 Scripting and Programming Foundations Pre-Assessment Exam – Complete 270 Questions with Verified A

Content preview

WGU D278 Scripting and Programming
Foundations Pre-Assessment Exam –
Complete 270 Questions with Verified
Answers
Official Exam Overview:
The WGU D278 Pre-Assessment Exam evaluates learners’ understanding of programming
fundamentals, including arithmetic operations, data types, variables, constants, and problem-
solving using code. The exam emphasizes proper use of operations, program logic, and
calculation techniques.

Exam Coverage Areas:

• Arithmetic Operations and Expressions
• Variables and Constants
• Control Structures and Loops
• Functions and Procedures
• Input/Output Handling
• Program Logic and Debugging
• Problem-Solving in Programming
• Multiple Choice and Short Answer Question Formats



QUESTION 1: A car drove 200 miles using 10 gallons of fuel. Which operation should be used
to compute the miles per gallon, which is 20?

a) Addition
b) Subtraction
c) Multiplication
d) Division ✅

Rationale: Division is used to compute miles per gallon by dividing the distance traveled (200
miles) by the fuel used (10 gallons), resulting in 20 mpg.

QUESTION 2: If a program multiplies two numbers, which arithmetic operation is being used?

a) Addition
b) Multiplication ✅
c) Division
d) Modulus

Rationale: Multiplication combines two numbers to calculate a product, used in scaling or
repeated addition scenarios.

QUESTION 3: To find the remainder when dividing 17 by 5, which operation is appropriate?

a) Division
b) Modulus ✅

,c) Subtraction
d) Exponentiation

Rationale: The modulus operation returns the remainder of a division, useful in programming
for loops and conditional checks.

QUESTION 4: When calculating total cost as quantity × price, which operation is applied?

a) Multiplication ✅
b) Addition
c) Division
d) Subtraction

Rationale: Multiplication calculates total cost by scaling the price by the number of items
purchased.

QUESTION 5: Which arithmetic operation should be used to calculate the average of five
numbers?

a) Sum all numbers and divide by five ✅
b) Subtract the smallest from the largest
c) Multiply all numbers together
d) Use modulus to find remainder

Rationale: The average is calculated by adding all numbers together and then dividing by the
count, which involves addition and division operations.

Page 1 of 53




Q: A car drove 200 miles using 10 gallons of fuel. Which operation should be used to compute
the miles per gallon, which is 20? - ANSWER-Division




Q: Which operator should be used to determine if a number is evenly divisible by 5? - ANSWER-
%




Q: A variable should hold a person's height in meters. Which data type should the variable be? -
ANSWER-Float

,Q: A variable should hold the names of all past U.S. presidents. Which data type should the
variable be? - ANSWER-String array




Q: A program uses the number of seconds in a minute in various calculations. How should the
item that holds the number of seconds in a minute be declared? - ANSWER-Constant integer
secondsPerMinute




1

, Page 2 of 53




Q: A program determines if a user's age is high enough to run for U.S. president. The minimum
age requirement is 35. How should the item that holds the minimum age be declared? -
ANSWER-Constant integer minAge




Q: Given integer x = 3 and integer y = 5.What is the value of the expression (x / 2.0) + y? -
ANSWER-6.5




Q: Given float x = 10.2 and float y = 1.0.What is the value of the expression x / y? - ANSWER-
10.2




Q: What kind of operator is the == in the expression i == 20? - ANSWER-Equality




Q: What is the purpose of parentheses () in a programming expression? - ANSWER-To group
expressions




Q: Given float x = 3.0.Which expression evaluates to 2.0? - ANSWER-x / 2 + 0.5 /2 + .25




Q: Which expression represents all the values of x, when x is the age ranging from 18 to 24
years old? - ANSWER-(x >= 18) and (x <= 24)




2

Document information

Uploaded on
January 21, 2026
Number of pages
55
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$30.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
STUVIAGRADES
4.8
(1062)
Sold
6696
Followers
468
Items
10164
Last sold
4 hours ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions