Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

WGU D278 EXAM

Rating
-
Sold
-
Pages
32
Grade
A+
Uploaded on
05-01-2026
Written in
2025/2026

This practice exam for WGU D278: Scripting and Programming – Foundations is designed to help students test their understanding of programming concepts. It covers algorithms, pseudocode, control structures, variables, functions, loops, debugging, data types, and basic object-oriented principles. The goal is to strengthen logical thinking and problem-solving skills for real-world programming tasks.

Show more Read less
Institution
Course

Content preview

WGU D278 SCRIPTING AND PROGRAMMING
FOUNDATIONS EXAM QUESTIONS AND ANSWERS
2025


1. What is the main purpose of programming?

A. To write long lines of code

B. To give instructions to a computer to solve a problem

C. To store data only

D. To replace databases

Answer: B

Explanation: Programming involves writing instructions that tell the computer how to

perform specific tasks.

2. In programming, what is an algorithm?

A. A hardware device

B. A list of random numbers

C. A step-by-step set of instructions to solve a problem

D. A data storage unit

Answer: C

Explanation: An algorithm outlines the logical steps to reach a solution before coding

begins.

3. Which of the following is a valid variable name in Python?

A. 1number

B. number_1

C. number-1

D. number 1

,WGU D278 SCRIPTING AND PROGRAMMING
FOUNDATIONS EXAM QUESTIONS AND ANSWERS
2025
Answer: B

Explanation: Variable names cannot start with numbers or contain spaces or hyphens.

4. What is the correct symbol for single-line comments in Python?

A. //

B. #

C. <!-- -->

D. /**/

Answer: B

Explanation: In Python, comments start with the # symbol.

5. What does the equal sign (=) mean in programming?

A. Comparison

B. Assignment

C. Addition

D. Equality test

Answer: B

Explanation: The equal sign assigns a value to a variable, not compares it.

6. Which data type would best represent a student’s name?

A. Integer

B. String

C. Float

D. Boolean

Answer: B

Explanation: A student’s name is textual data, represented by a string.

,WGU D278 SCRIPTING AND PROGRAMMING
FOUNDATIONS EXAM QUESTIONS AND ANSWERS
2025
7. What will the expression 3 + 4 * 2 evaluate to in Python?

A. 14

B. 11

C. 10

D. 8

Answer: B

Explanation: Python follows order of operations (PEMDAS), so 4 * 2 = 8, then 3 + 8 = 11.

8. Which keyword is used to create a function in Python?

A. define

B. func

C. function

D. def

Answer: D

Explanation: The keyword def defines a new function in Python.

9. What is the output of print(type(25.5))?

A. int

B. float

C. string

D. bool

Answer: B

Explanation: The number 25.5 includes a decimal, so it’s a float.

10. What does a loop allow a program to do?

A. Repeat actions until a condition is met

, WGU D278 SCRIPTING AND PROGRAMMING
FOUNDATIONS EXAM QUESTIONS AND ANSWERS
2025
B. Store data permanently

C. Ignore conditions

D. Stop immediately

Answer: A

Explanation: Loops repeat blocks of code as long as a condition remains true.

11. Which keyword starts a loop that checks a condition before running the body each time?

A. for

B. do

C. while

D. loop

Answer: C

Explanation: The while loop executes repeatedly while its condition evaluates to true.

12. Which of the following is a Boolean value?

A. 1.0

B. True

C. “Yes”

D. 0

Answer: B

Explanation: In Python, Boolean values are True and False.

13. Which function is used to display output to the screen?

A. display()

B. output()

C. print()

Written for

Course

Document information

Uploaded on
January 5, 2026
Number of pages
32
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$11.99
Get access to the full document:

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

Get to know the seller
Seller avatar
kemuntoclaudia29

Get to know the seller

Seller avatar
kemuntoclaudia29 Chamberlain College Of Nursing
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
4 months
Number of followers
0
Documents
91
Last sold
-
Kemy Documents

Looking for high-quality, reliable study materials that actually help you succeed? You’re in the right place! Here, you’ll find carefully crafted notes, exam prep guides, practice questions, and study resources across a variety of subjects all designed to make learning easier, faster, and more effective. Whether you’re a student looking to ace your exams, save time, or deepen your understanding, our resources are made with clarity, accuracy, and practical insights in mind. Study smarter, not harder, and achieve your academic goals with confidence! Why Choose our Shop? 1.Clear, concise, and well-organized materials 2.Covers multiple subjects and levels 3.Perfect for exam prep and revision 4.Trusted by students who want results Start exploring our resources today and take your studying to the next level!

Read more Read less
0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

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