Escrito por estudiantes que aprobaron Inmediatamente disponible después del pago Leer en línea o como PDF ¿Documento equivocado? Cámbialo gratis 4,6 TrustPilot
logo-home
Examen

WGU D278 SCRIPTING AND PROGRAMMING FOUNDATIONS EXAM QUESTIONS AND ANSWERS

Puntuación
-
Vendido
-
Páginas
151
Grado
A+
Subido en
30-06-2026
Escrito en
2025/2026

WGU D278 SCRIPTING AND PROGRAMMING FOUNDATIONS EXAM QUESTIONS AND ANSWERS

Institución
Grado

Vista previa del contenido

WGU D278 SCRIPTING AND PROGRAMMING FOUNDATIONS EXAM QUESTIONS
AND ANSWERS 2026 .

WGU D278 Scripting and Programming Foundations - 200 Practice Questions

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



Answer: D



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. This is a
rate calculation where the total distance is divided by the total fuel consumed .



Question 2

Which operator should be used to determine if a number is evenly divisible by 5?

,A. +

B. -

C. *

D. %



Answer: D



Rationale: The modulus operator (%) returns the remainder after division. If a
number modulo 5 equals 0, the number is evenly divisible by 5. This is commonly
used in programming for checking divisibility and in loop conditions .



Question 3

A variable should hold a person's height in meters. Which data type should the
variable be?



A. Integer

B. Float

C. String

D. Boolean

,Answer: B



Rationale: Float (floating-point) data types store numbers with decimal points.
Height in meters typically requires decimal precision (e.g., 1.75 meters). Integers
only store whole numbers and would lose precision .



Question 4

A variable should hold the names of all past U.S. presidents. Which data type
should the variable be?



A. Integer array

B. Float array

C. String array

D. Boolean array



Answer: C

, Rationale: Names are text data, which should be stored as strings. Since multiple
names are needed, an array of strings is appropriate. This allows storing and
accessing multiple text values efficiently .



Question 5

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?



A. Constant float userTime

B. Variable float userTime

C. Constant integer secondsPerMinute

D. Variable integer secondsPerMinute



Answer: C



Rationale: The number of seconds in a minute (60) is a fixed, unchanging value. It
should be declared as a constant integer. Constants improve code readability and
prevent accidental modification of values that should remain fixed .



Question 6

Escuela, estudio y materia

Institución
Grado

Información del documento

Subido en
30 de junio de 2026
Número de páginas
151
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas

Temas

$29.99
Accede al documento completo:

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Conoce al vendedor
Seller avatar
supergrader
5.0
(2)

Conoce al vendedor

Seller avatar
supergrader Teachme2-tutor
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
6
Miembro desde
11 meses
Número de seguidores
0
Documentos
2157
Última venta
3 semanas hace
supergrade

Welcome to supergrade Stuvia shop! We offer a wide range of high-quality study materials, including Test Banks, Study Guides, and comprehensive notes for various courses. If you’re looking for specific materials, feel free to send me a message here on Stuvia, and I’ll help you find exactly what you need. Study smarter and achieve your best results

5.0

2 reseñas

5
2
4
0
3
0
2
0
1
0

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes