100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

WGU C173 STUDY EXAM QUESTIONS AND ANSWERS

Rating
-
Sold
-
Pages
9
Grade
A+
Uploaded on
08-02-2025
Written in
2024/2025

WGU C173 STUDY EXAM QUESTIONS AND ANSWERS....

Institution
WGU C173
Course
WGU C173









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
WGU C173
Course
WGU C173

Document information

Uploaded on
February 8, 2025
Number of pages
9
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

WGU C173 STUDY EXAM QUESTIONS
AND ANSWERS

What is the purpose of a variable? - ANSWER to hold value


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


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


What is a programming expression? - ANSWER a programming expression is a
collection of things such as variables, literals, operators, and parenthses which
evaluates to produce a value


What is a valid Identifier? - ANSWER can only include letter (a-z, A-Z),
underscore (_), and digit (0-9) combination
Must start with letter


What is a literal? - ANSWER A literal in code is an explicit value as in 2


What is an operator? - ANSWER is a symbol that performs a built-in
calculation, such as the operator + which performs addition.


What precedence rules does programming use? - ANSWER ( ) parentheses
unary -negation

, * / multiplication/ division
+ - addition/Subtraction
Left to Right


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


What if you divide two integers? - ANSWER the result will be an integer no
decimal points used (use integer division)


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


What if you divide a non-zero floating point number by zero? - ANSWER
divide-by-zero error and the program terminates.


How do you change the type of an item? - ANSWER If either is a float the
other is converted to a float
For assignments, the right side type is changed to the left side type
integer-to-float conversion is easy: 25 becomes 25.0.
float-to-integer conversion just loses the fraction: 4.9 becomes 4.
Type casting Ex: If myIntVar is 7, then myIntVar * 1.0 changes integer 7 into
float 7.0.


What does the % operator do? - ANSWER returns the remainder of the
division of two integer operands. Ex: 23 % 10 is 3.

Get to know the seller

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.
luzlinkuz Chamberlain University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1424
Member since
4 year
Number of followers
849
Documents
27509
Last sold
3 days ago

3.7

302 reviews

5
131
4
60
3
54
2
17
1
40

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

Frequently asked questions