Chapter 4: Algorithms and Programming

0.0(0)
studied byStudied by 12 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/36

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

37 Terms

1
New cards
Meaningful variable names
________ help with the readability of program code and reduce the level of complexity of a program.
2
New cards
input parameter
The ________ for the DISPLAY abstraction is expression.
3
New cards
modulus
A(n) ________ is a mathematical operation that returns the remainder after an initial number (the dividend) is divided by another number (the divisor)
4
New cards
dividend
If the ________ is less than the divisor, the resulting modulus calculation will equal the value of the ________.
5
New cards
modulus calculation
If the divisor is a multiple of the dividend, it will divide evenly with no remainder, resulting in a(n) ________ of 0.
6
New cards
abstraction
A(n) ________ is a way to represent essential features without including the background details or explanations.
7
New cards
DISPLAY
________ (expression) is an abstraction that is used on your AP exam to ________ a value of expression followed by a space.
8
New cards
assignment operator
The ________ allows a program to change the value represented by a variable.
9
New cards
left of MOD
A zero to the ________ is feasible and results in a modulus calculation of 0.
10
New cards
COBOL
The first language to use abstractions instead of machine language was ________, which was designed by Grace Hopper.
11
New cards
SWAP
THE ________: A common algorithm is the ________.
12
New cards
dividend
The ________ is 4, and 3 is the divisor.
13
New cards
modulus
The ________ is the integer remainder when two numbers are divided.
14
New cards
Abstractions
________ reduce complexity and allow for efficient design and implementation of complex software systems.
15
New cards
Coding in a programming language is often translated into code in another low
level language that the computer can execute
16
New cards
First
Parentheses
17
New cards
Second
MOD, *, /
18
New cards
Third
+, −
19
New cards
Write a 1 on top, and multiply it by the divisor
1 multiplied by 3 is 3
20
New cards
Answer
0
21
New cards
Answer
True
22
New cards
Answer
50%
23
New cards
THE SWAP
A common algorithm is the swap
24
New cards
abstraction
is a way to represent essential features without including the background details or explanations.
25
New cards
*System.out.print(“Hello World”);*

\n
In JAVA, the same code can be written using the System.out.print abstraction:
26
New cards
Programmers
have worked to hide details by using abstractions.
27
New cards
Variables
vary
28
New cards
Coding
in a programming language is often translated into code in another low- level language that the computer can execute.
29
New cards
DISPLAY
(expression) is an abstraction that is used on your AP exam to display a value of expression followed by a space.
30
New cards
modulus
is a mathematical operation that returns the remainder after an initial number (the dividend) is divided by another number (the divisor).
31
New cards
list
is an ordered sequence of elements starting with the index 1.
32
New cards
ROTATE_RIGHT
will rotate the robot 90 degrees clockwise.
33
New cards
ROTATE_LEFT
will rotate the robot 90 degrees counterclockwise.
34
New cards
Loops
will repeat a section of code until a condition is met.
35
New cards
Swap
common algorithm
36
New cards
linear search
(or sequential search) is an algorithm for finding an element in a list.
37
New cards
binary search
is a search algorithm that halves the number of elements that need to be searched after every comparison.