• 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 35 pages
Exam (elaborations)

D278 Scripting and Programming Foundations Lessons 2–9 Questions (2026/2027) | WGU Exam Prep & Practice Review

Document preview thumbnail
Preview 4 out of 35 pages

D278 Scripting and Programming Foundations Lessons 2–9 Questions (2026/2027) created for Western Governors University students preparing for the D278 assessment. This focused resource includes core topics and practice questions associated with Lessons 2 through 9 to support structured review and exam preparation. D278 Questions, Programming Study, WGU D278, Scripting Study, Practice Questions, Exam Prep, Coding Basics, Course Review, WGU Study, Programming Prep D278 Scripting and Programming Foundations Lessons 2–9 Questions 2026/2027, WGU D278 Lessons 2–9 Practice Questions, D278 Scripting and Programming Questions, WGU D278 Practice Questions 2026/2027, D278 Programming Foundations Exam Prep, D278 Lessons 2–9 Study Guide, WGU D278 Exam Review Questions, D278 Scripting Practice Questions, D278 Programming Practice Questions, WGU Scripting and Programming Foundations Review, D278 WGU Exam Prep, D278 Course Review Questions, D278 Programming Foundations Study Questions, D278 Scripting Foundations Exam Review, WGU D278 Assessment Prep, D278 Coding Practice Questions, D278 Lessons 2 Through 9 Review, D278 Programming Exam Questions, D278 Complete Practice Review, Western Governors University D278 Questions

Content preview

, Lesson 2 Questions | Programming Fundamentals
• What is the purpose of a variable?

variable is a named item, such as x or numPeople, used to hold a value

other examples include: age, name, height, or total

• How do you save a value to a variable?

Value is assigned to a value by using “=” example z = w + 2

• What is a programming expression?

expression is a combination of items, like variables, literals, operators, and parentheses,
that evaluates to a value.

assignment statement assigns a variable with a value, such as x = 5

assignment statement contains the following :

(variable) = (expression) This would combined variable and expression

• What is an identifier?

Identifier – a label created by a programmer for an item such as a function or variable

• What constitutes a valid identifier?

1. Be a sequence of letters, underscores, and digits

2. Must start with a letter

3. Identifiers are case sensitive

• What is a literal?

Literal = specific values like 2 or 5.79

• What is an operator?

Operator = think ‘operation’ are examples of symbols that represent arithmetic

,Categories of Operators:




Summary

• Arithmetic Operators: Perform mathematical calculations.

• Relational Operators: Compare values and return boolean results.

• Logical Operators: Perform logical operations on boolean values.

• Assignment Operators: Assign values to variables and modify them.

• Bitwise Operators: Perform operations on the binary representations of integers.

Sometimes the most confusing is = vs == as they are in different operatiors




• What precedence rules does programming use?

, precedence rules – similar to PEDMAS in arithmetic, dictate the order of operations; In
this case of something has equal preference than it is based on left-to-right rules. Modulo
has equal precedence to division and multiplication.



• How does an integer differ from a float?

integer – holds whole number values

floating-point number is a real number, like 98.6, 0.0001, or -666.667

floating-point literal is a number with a fractional part, even if that fraction is 0, as in 1.0,
0.0, or 99.573

• What happens if you divide two integers? A integer and float?

Dividing by two integers, if the first is smaller than the second than it will end up 0 as an
integer. If it is float then it will include decimal places. Example 10/12 = 0 for integer but
would be 0.83 (longer depending on the number of allowable decimal places)

• What happens if you divide a nonzero floating point number by

zero?

In Coral, dividing floating point by zero does not give an error, it gives either infinity or -
infinity depending on the sign

• How do you convert an item’s type?

Document information

Uploaded on
October 6, 2026
Number of pages
35
Written in
2026/2027
Type
Exam (elaborations)
Contains
Questions & answers
$10.99

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.
LectJoshua
4.0
(1703)
Sold
9456
Followers
5522
Items
7905
Last sold
12 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