Chapter 9: Algorithms and Programming

0.0(0)
Studied by 4 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/114

Last updated 12:34 PM on 2/20/23
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

115 Terms

1
New cards
2
New cards
3
New cards
4
New cards
5
New cards
6
New cards
7
New cards
8
New cards
9
New cards
10
New cards
11
New cards
12
New cards
13
New cards
14
New cards
15
New cards
16
New cards
17
New cards
18
New cards
19
New cards
20
New cards
21
New cards
22
New cards
23
New cards
24
New cards
25
New cards
algorithm
is a set of steps to do a task. 
26
New cards
27
New cards
28
New cards
29
New cards
30
New cards
31
New cards
32
New cards
33
New cards
34
New cards
35
New cards
36
New cards
37
New cards
38
New cards
39
New cards
40
New cards
41
New cards
42
New cards
43
New cards
44
New cards
45
New cards
46
New cards
47
New cards
48
New cards
49
New cards
50
New cards
51
New cards
52
New cards
53
New cards
54
New cards
55
New cards
56
New cards
57
New cards
58
New cards
Natural language
is our native speaking and writing language, so it is much easier for people to use and understand.
59
New cards
Programming languages
are very strict with their syntax, which is like their grammar and structure.
60
New cards
Pseudocode
is used to map out a program’s structure before beginning to write the code and uses a combination of natural and programming languages.
61
New cards
Flowcharting
helps to visualize how the program will be structured.
62
New cards
Clarity
refers to how easy it is to understand. 
63
New cards
Readability
is important to help programmers understand a program. 
64
New cards
Variables
are placeholders for values a program needs to use. 
65
New cards
Data types
are the way computers assign some meaning to these binary digits. 
66
New cards
Strings
are text fields that are just a series of characters and are denoted with quotation marks around the string field. 
67
New cards
Integers
can be used in mathematical operations and expressions, whereas strings (text fields) cannot.
68
New cards
**“Fractional” Numbers**
These are numbers with a decimal point, even if a number has 0 (zero) for the decimal value, such as 52.0. 
69
New cards
MOD
is the symbol used for modulus math in many programming languages.
70
New cards
**Assignment Statements**
To assign a value to a variable, the assignment operator is used.
71
New cards
Expressions
are calculations to be evaluated to an answer or single value.
72
New cards
Boolean Values

\
are one of the foundations of computer code.
73
New cards
Boolean expressions
can be simple or compound.
74
New cards
**AND LOGICAL OPERATOR**
To be true, both of the operands on either side of the AND operator must be true when evaluated individually.
75
New cards
**OR LOGICAL OPERATOR**
For the OR operator, either or both of the operands can be true for the condition to be true.
76
New cards
**NOT LOGICAL OPERATOR**
With the NOT operator, if a condition was true, then NOT makes it false.
77
New cards
**Program Statements**
All programs can be written using a combination of only three types of statements.
78
New cards
**Sequential**
These are statements that are executed as written in order in the program.
79
New cards
Selection Statements
These are a key component to many programs.
80
New cards
**Iterative**
are also referred to as repetitive statements or loops.
81
New cards
**REPEAT n TIMES Loop**
This loop will repeat a specified number of times: “n” is a variable that must be set to a positive integer for the loop to run.
82
New cards
**REPEAT UNTIL (Condition) Loop**
has a condition to evaluate at each iteration of the loop.
83
New cards
**Combining Algorithms**
One of the key features of algorithms is that once they are created, you can use them over and over, combine them for more complex problem solving, or modify them for a new use.
84
New cards
**Common Algorithms**
Determining the maximum or minimum number from two or more numbers.
85
New cards
Robots
There are four commands you are responsible for understanding and using.
86
New cards
MOVE_FORWARD
One command the robot can follow is
87
New cards
CAN_MOVE
can be used in an IF statement in your code to navigate through the maze.
88
New cards
Lists
in a program can be a collection of numbers, words, phrases, or a combination of these.
89
New cards
**List Indices**
Individual items in a list are called elements and are accessed by position using an index.
90
New cards
Index positions
are always integers and are enclosed within square brackets \[index\].
91
New cards
INSERT
command causes elements to the right of the indicated index position, i, to shift right one position to make room for the new element.
92
New cards
APPEND
command will add the new element to the end of the list, so no index position is needed.
93
New cards
REMOVE
command deletes the element at the provided index position and shifts the remaining elements one position to the left.
94
New cards
Traversing
a loop that will automatically repeat the code for each element in the list.
95
New cards
**Searching**
deals with finding the needed element from everything in the dataset or determining that it is not there.
96
New cards
Linear searches
also called sequential searches, check each individual record, starting at the beginning and going to the end, one after the other in order to either find the desired data or to determine it is not in the dataset.
97
New cards
Binary searches
are far more efficient than linear searches.
98
New cards
Procedures
are also called functions in some programming languages.
99
New cards
Parameters
allow the calling program to send values to the procedure.
100
New cards
Procedural abstraction
You only need to know the name of the procedure, the number and type of parameters, and the output to expect.