logic and computers chapter 2,3,4 Flashcards
This is what all objects in an Alice world have.
C- Primitive methods
The primitive move method requires two arguments. What are they
A-The first argument is direction; the second argument is distance (or amount)
When programmers execute a method, this is what they commonly say they are
doing.
D. Calling the method
This is a piece of information that a method requires in order for it to execute.
A. Argument
This is a method that only objects of a specific class have.
B. Custom
This is the naming convention in which monkey see is written.
C. camelCase
This is the naming convention in which WhiteRabbit is written.
A. PascalCase
This is the naming convention in which object names and method names should
be written.
C. camelCase
This is the naming convention in which class names are written.
A. PascalCase
This is a way of writing out the steps of an algorithm in English
B. Pseudocode
This is a graphical diagram that depicts the steps in a diagram.
D. Flowchart
This is a mistake that does not prevent the program from running, but causes it
to produce incorrect results.
C Logical error
This is a note of explanation that is inserted into a program.
A. Comment
This is a structure that causes a group of instructions to be executed simultaneously.
A. Do together
This is a structure that causes a group of instructions to be executed in the order
that they appear inside the structure.
D. Do in order
This is what a local variable belongs to
B. A method
What is meant when the characters 123 appear on a variable tile?
D. The variable’s type is Number
This type of instruction changes the contents of a variable.
D. Set instruction
This is what an instruction that sets a variable to a value is often called.
A. a variable assignment
This is the difference between a method and a function.
C. A function returns a value back to the instruction that called the function
This world function allows the user to enter a number, and returns that number.
B. ask user for a number
This primitive function returns the distance from one object’s center point to another object’s center point.
C. distance to
This symbol is used as the multiplication operator in most programming languages.
C. *
This world function allows the user to enter a string, and returns that string
B. ask user for a string
This is what joining two strings is also known as.
A. String concatenation
What world function do you use to join two strings?
D. The a joined with b function
What world function do you use to convert a non-string object to a string?
A. The what as a string function
The world object’s ask user for yes or no function returns this value if the user clicks the Yes button.
B. True
The world object’s ask user for yes or no function returns this value if the
user clicks the No button.
C. False
The If/Else instruction tests a condition that must be of this type.
A. Boolean
An If/Else instruction that has an empty Else part is this type of structure.
B. Single-alternative decision structure
An If/Else instruction that is inside of another If/Else instruction is said to be
D. Nested
If you need to determine whether one value is greater than another value, you use
one of these operators.
C. Relational
You use this operator to determine whether one value is equal to another value.
B. ==
You use this operator to determine whether one value is not equal to another value.
A. ! =
When a complex condition is created with this logical operator, the operand a must be true and the operand b must be true in order for the complex condition
to be true
B. both a and b
When a complex condition is created with this logical operator, the operand a can be true, or the operand b can be true, or both operands a and b can be true in order for the complex condition to be true.
A. either a or b, or both