• 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 2 out of 8 pages
Exam (elaborations)

WGU D278 Scripting And Programming Foundations – Questions With Right Solutions

Document preview thumbnail
Preview 2 out of 8 pages

WGU D278 Scripting And Programming Foundations – Questions With Right Solutions

Content preview

WGU D278 Scripting And Programming
Foundations – Questions With Right Solutions
What is the purpose of a variable? Correct Answer - To store
Data values that can be changed and used later in a program

How do you save a value to a variable? Correct Answer - By
using a assignment statement Ex: X=5

What is a programming expression? Correct Answer - A
combination of variables, literals, and operators that produce a
value

What is an identifier? Correct Answer - The name used to
identify variables functions or other entities in code

What constitutes a valid identifier? Correct Answer - starts
with a letter or underscore followed by letters,digits or underscores
and no spaces or special characters

What is a literal? Correct Answer - A fixed value written
directly in code ex: 42, Hello, 3.14

What is an operator? Correct Answer - A symbol or keyword
that performs operations on variables and values ex +,-,/,*

What precedence rules does programming use? Correct Answer -
Rules that determine the order in which operations are performed,
Ex Parenethesis, Multiplication, addition/subtraction
P
E
M
D

, A
S

How does an integer differ from a float Correct Answer - An
integer is a whole number without a decimal point, while a float is a
number with decimal places

What happens if you divide two integers/ an integer and a float?
Correct Answer - Dividing two integers often results in integer
division (discarding remainder) or float division depending on
language.

Dividing an integer by a float results in a float

What happens if you divide a nonzero floating point number by
zero? Correct Answer - It results in infinity or a runtime error,
depending on the language and environment.

How do you convert an item's type? Correct Answer - By using
type casting functions like int(), float(), or similar.

What does the modulo operator do? Correct Answer - Returns
the remainder after division of one number by another.

What is the difference in a variable and a constant? Correct
Answer - Variables can change values; constants cannot be
changed once set.

How does an array work? Correct Answer - An array stores
multiple values of the same type in a contiguous block of memory,
accessible via indices.

What does index reference? Correct Answer - The position of
an element in an array or list, usually starting at 0.

Document information

Uploaded on
July 4, 2025
Number of pages
8
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
CA$18.41

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.
LeCrae
4.0
(449)
Sold
2150
Followers
1409
Items
22742
Last sold
1 week 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