logic and computers chapter 2,3,4 Flashcards

(37 cards)

1
Q

This is what all objects in an Alice world have.

A

C- Primitive methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

The primitive move method requires two arguments. What are they

A

A-The first argument is direction; the second argument is distance (or amount)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When programmers execute a method, this is what they commonly say they are
doing.

A

D. Calling the method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

This is a piece of information that a method requires in order for it to execute.

A

A. Argument

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

This is a method that only objects of a specific class have.

A

B. Custom

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

This is the naming convention in which monkey see is written.

A

C. camelCase

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

This is the naming convention in which WhiteRabbit is written.

A

A. PascalCase

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

This is the naming convention in which object names and method names should
be written.

A

C. camelCase

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

This is the naming convention in which class names are written.

A

A. PascalCase

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

This is a way of writing out the steps of an algorithm in English

A

B. Pseudocode

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

This is a graphical diagram that depicts the steps in a diagram.

A

D. Flowchart

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

This is a mistake that does not prevent the program from running, but causes it
to produce incorrect results.

A

C Logical error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

This is a note of explanation that is inserted into a program.

A

A. Comment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

This is a structure that causes a group of instructions to be executed simultaneously.

A

A. Do together

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

This is a structure that causes a group of instructions to be executed in the order
that they appear inside the structure.

A

D. Do in order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

This is what a local variable belongs to

17
Q

What is meant when the characters 123 appear on a variable tile?

A

D. The variable’s type is Number

18
Q

This type of instruction changes the contents of a variable.

A

D. Set instruction

19
Q

This is what an instruction that sets a variable to a value is often called.

A

A. a variable assignment

20
Q

This is the difference between a method and a function.

A

C. A function returns a value back to the instruction that called the function

21
Q

This world function allows the user to enter a number, and returns that number.

A

B. ask user for a number

22
Q

This primitive function returns the distance from one object’s center point to another object’s center point.

A

C. distance to

23
Q

This symbol is used as the multiplication operator in most programming languages.

24
Q

This world function allows the user to enter a string, and returns that string

A

B. ask user for a string

25
This is what joining two strings is also known as.
A. String concatenation
26
What world function do you use to join two strings?
D. The a joined with b function
27
What world function do you use to convert a non-string object to a string?
A. The what as a string function
28
The world object’s ask user for yes or no function returns this value if the user clicks the Yes button.
B. True
29
The world object’s ask user for yes or no function returns this value if the user clicks the No button.
C. False
30
The If/Else instruction tests a condition that must be of this type.
A. Boolean
31
An If/Else instruction that has an empty Else part is this type of structure.
B. Single-alternative decision structure
32
An If/Else instruction that is inside of another If/Else instruction is said to be
D. Nested
33
If you need to determine whether one value is greater than another value, you use one of these operators.
C. Relational
34
You use this operator to determine whether one value is equal to another value.
B. ==
35
You use this operator to determine whether one value is not equal to another value.
A. ! =
36
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
37
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