Western Governors University

D278: Scripting and Programming - Foundations

A study guide to WGU's D278, the language-agnostic introduction to variables, data types, flow control, algorithms and the difference between interpreted and compiled languages.

Updated October 2026 · 5 min read

D278 is Western Governors University's first programming course, teaching how programs think before you commit to any one language.

WGU's program guide describes it as an introduction to programming basics such as variables, data types, flow control and design concepts. It is language-agnostic, ends with a survey of languages, and introduces the distinction between interpreted and compiled languages.

Students also learn to identify scripts for program requirements and to follow the logic and outcome of simple algorithms.

The B.S. Software Engineering places it in term 1. Many students find it challenging because tracing what code does, line by line, is a new way of reading.

Course at a Glance

ItemDetails
UniversityWestern Governors University (WGU)
Course codeD278 (codes can change between catalog versions)
LevelUndergraduate, competency-based
Competency units3
ProgramB.S. Software Engineering, term 1 (also used in other IT degrees)
LanguageLanguage-agnostic, with a survey of languages

What D278 Covers

Competency (summarized)What it means in practice
Explain the logic and outcome of simple algorithmsTracing loops and branches to predict output
Identify scripts for program requirementsChoosing code or pseudocode that meets a stated need
Use fundamental programming elementsVariables, types, operators, conditions, loops and functions

Key Concepts Explained

Variables and Data Types

A variable is a named value; its type decides what you can do with it. Integers, floating-point numbers, strings and Booleans behave differently.

Example: If a = 7 and b = 2 are integers, integer division in many languages gives a / b = 3, while floating-point division gives 3.5. Knowing which one a language uses avoids a classic error.

Flow Control and Tracing

Conditions choose a path; loops repeat. To predict output, trace each variable's value at every step in a small table.

Example: total = 0; for i from 1 to 4: if i is even, total = total + i. Trace: i=1 skip, i=2 total 2, i=3 skip, i=4 total 6. Output: 6.

Interpreted and Compiled Languages

A compiled language (such as C++) is translated into machine code before it runs. An interpreted language (such as Python) is executed by an interpreter at run time. Some, such as Java, compile to an intermediate bytecode first.

Typical Assessment Work and How to Approach It

Task typeWhat it testsHow to approach it
Predict the outputAlgorithm tracingUse a trace table, one row per step
Choose the right codeMatching scripts to requirementsTest each option against the requirement with sample values
Concept questionsTypes, operators, languagesLearn definitions with one example each
Pseudocode or flowchartsDesign conceptsWrite steps in plain language before syntax

Pseudocode and Design Concepts

WGU's description lists design concepts alongside variables and flow control. In practice that means planning logic before writing code, usually in pseudocode or a flowchart.

Requirement: "Ask for a test score from 0 to 100 and print the letter grade (A for 90 and above, B for 80 to 89, C for 70 to 79, otherwise F)."

Pseudocode: get score; if score < 0 or score > 100, print "invalid"; else if score >= 90, print "A"; else if score >= 80, print "B"; else if score >= 70, print "C"; else print "F".

Check with test values: 95 gives A, 80 gives B (boundary), 69 gives F, 105 gives invalid.

Testing boundary values, such as exactly 80 or exactly 70, catches the most common logic errors.

Functions

Functions package logic into reusable, named blocks with inputs (parameters) and outputs (return values). When a question shows a function call, trace into the function, note what it returns, then continue from the call.

The Survey of Languages

The course ends with a survey of languages. Learn what distinguishes common ones, for example Python for readability and scripting, JavaScript for the web, Java and C# for large applications, and C++ for performance, rather than their syntax.

Where Students Get Stuck

Study Tips for D278

How We Help with D278

Send the topics or practice questions you find difficult and any feedback. A programming tutor explains the logic, prepares worked traces and pseudocode examples, and checks your understanding with similar problems.

GradeEssays is independent of Western Governors University. We do not take exams or assessments or log in to student portals; our help is tutoring and study material under WGU's academic integrity rules.

Make Programming Logic Click

Share the D278 practice questions and feedback. A tutor prepares worked traces and explanations you can learn from.

Start My D278 Help

Free revisions · Full refund if late · Written from scratch for your order

Frequently Asked Questions

Does D278 teach a specific language?

WGU describes it as language-agnostic, ending with a survey of languages.

What is the difference between interpreted and compiled languages?

Compiled code is translated to machine code before running; interpreted code is executed by an interpreter at run time.

Is D278 hard for beginners?

It is designed as an introduction, but tracing logic carefully takes practice. Working through problems on paper helps.

What comes after D278?

In the software engineering degree, students move on to language-specific courses such as Introduction to Programming in Python and later Java.

How do I get better at predicting output?

Use trace tables, write every variable change down, and check loop bounds carefully.

Can you explain a practice question?

Yes. Send it, and a tutor walks through the logic step by step.