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
Document preview thumbnail
Preview 2 out of 9 pages
Exam (elaborations)

WGU C173 Study Set – Questions With Comprehensive Solutions

Document preview thumbnail
Preview 2 out of 9 pages

WGU C173 Study Set – Questions With Comprehensive Solutions

Content preview

WGU C173 Study Set – Questions With
Comprehensive Solutions
What is the purpose of a variable? Correct Answer - to hold
value

How do you save a value to a variable? Correct Answer - Use
an Assignment statement such as x=5

What is an identifier? Correct Answer - A name created by a
programmer for an item like a variable or function.

What is a programming expression? Correct Answer - is a
combination of items, like variables, literals, operators, and
parentheses, that evaluates to a value

What constitutes a valid Identifier? Correct Answer - must be a
sequence of letters (a-z, A-Z), underscores (_), and digits (0-9)
start with a letter

What is a literal? Correct Answer - A literal is a specific value
in code, like 2

What is an operator? Correct Answer - is a symbol that
performs a built-in calculation, like the operator + which performs
addition.

What precedence rules does programming use? Correct Answer -
( ) parentheses
unary - negation
* / multiplication/ division
+ - addition/Subtraction
Left to Right

, How does an integer differ from a float? Correct Answer -
Integer=Whole Numbers
Float=Numbers with decimals

What happens if you divide two integers? Correct Answer - the
solution will be an integer no decimal points used (use integer
division)

What happens if you divide an integer and a float? Correct Answer
- (uses floating point division)

What happens if you divide a nonzero floating point number by
zero? Correct Answer - divide-by-zero error and the program
terminates.

How do you convert an item's type? Correct Answer - If either
is a float the other is converted to a float
For assignments, the right side type is converted to the left side type
integer-to-float conversion is straightforward: 25 becomes 25.0.
float-to-integer conversion just drops the fraction: 4.9 becomes 4.
Type casting Ex: If myIntVar is 7, then myIntVar * 1.0 converts
integer 7 to float 7.0.

What does the modulo operator do? Correct Answer -
evaluates to the remainder of the division of two integer operands.
Ex: 23 % 10 is 3.

What is the difference in a variable and a constant? Correct
Answer - A constant is a named value item that holds a value that
cannot change.
Variable value changes

Document information

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

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.
StudyHall
3.8
(231)
Sold
1348
Followers
825
Items
17221
Last sold
1 day 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