Chapter 5 Message The Person

subject Type Homework Help
subject Pages 4
subject Words 664
subject Authors Diane Zak

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Chapter 5: The Secret Code (Assignment Statements)
TRUE/FALSE
1. Coding the algorithm is the second step in the problem-solving process.
2. Many programmers use comments to document a procedure’s purpose, as well as to explain various
sections of the procedure’s code.
3. Comments make the code less readable but easier to understand by anyone viewing it.
4. When creating a comment in a program, a space is required to separate the apostrophe from the
comment itself.
5. The syntax of the Val function is Val(text), where text is the characters you want treated as a number.
6. For a text argument in the Val function to be converted to a number, it must contain only numbers and
an optional period.
7. When an invalid character is encountered in a text argument in a Val function, the Val function notes
an error and continues the process.
8. You instruct the computer to perform a calculation by writing an arithmetic expression that contains
one or more arithmetic operators.
9. You cannot override the order of precedence for arithmetic operators.
10. In the order of precedence, an exponentiation operator has a precedence number of 1.
11. In the order of precedence, the modulus operator has a lower priority than the addition and subtraction
operators.
page-pf2
12. You might use the integer division operator in a program that determines the number of quarters,
dimes, and nickels to return as change to a customer.
13. The modulus operator cannot be used to divide numbers that contain a decimal place.
14. When the computer processes the assignment statement, it first performs the calculation that appears
on the leftt side of the assignment operator.
15. You center the contents of a control by setting the control’s TextAlign property.
MULTIPLE CHOICE
1. A(n) ____ box is designed to accept information from the user, and it automatically stores the
information in its Text property.
a.
data
c.
entry
b.
text
d.
information
2. A ____ is a message to the person reading the code.
a.
comment
c.
heading
b.
header
d.
footer
3. A comment is referred to as ____ documentation.
a.
external
c.
revealed
b.
hidden
d.
internal
4. You create a comment in Visual Basic by placing a(n) ____ before the text that represents the
comment.
a.
period
c.
apostrophe
b.
exclamation mark
d.
asterisk
5. The value stored in a control’s Text property is always treated as ____ text, even when the value
contains only numbers.
a.
alpha
c.
numeric
b.
alphanumeric
d.
arithmetic
page-pf3
6. A ____ is a predefined procedure that performs a specific task and then returns a value after
completing the task.
a.
sub
c.
method
b.
function
d.
routine
7. The ____ function temporarily converts one or more characters to a number, and then returns the
number.
a.
Value
c.
Number
b.
Change
d.
Val
8. An ____ represents information that is passed to the function while the function is processing.
a.
argument
c.
object
b.
item
d.
assignment
9. The function Val(txtSales.Text) returns the number ____ when the txtSales control is empty.
a.
-1
c.
1
b.
0
d.
2
10. ____ indicate the order in which the computer performs the operation in an expression.
a.
Order numbers
c.
Precedence numbers
b.
Operation order numbers
d.
Operation numbers
11. You use the ____ operator ( \ ) to divide two integers (whole numbers), and then return the result as an
integer.
a.
division
c.
whole division
b.
modulus
d.
integer division
12. After dividing the numbers, the ____ operator returns the remainder of the division.
a.
division
c.
remainder
b.
modulus
d.
integer division
13. A(n) ____ is used to assign a value to something (such as the property of a control) while an
application is running.
a.
assignment statement
c.
selection statement
b.
loop statement
d.
decision statement
14. The equal sign in an assignment statement is referred to as the ____.
a.
assignment unit
c.
assignment operator
page-pf4
b.
assignment controller
d.
assignment status
15. The area above the Public Class clause is called the ____ section.
a.
Comments
c.
Function
b.
General Declarations
d.
Argument

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.