Chapter 9: Algorithms and Programming

studied byStudied by 4 people
0.0(0)
get a hint
hint

Individual items

1 / 114

115 Terms

1

Individual items

________ in a list are called elements and are accessed by position using an index.

New cards
2

REMOVE command

The ________ deletes the element at the provided index position and shifts the remaining elements one position to the left.

New cards
3

Integers

________ can be used in mathematical operations and expressions, whereas strings (text fields) can not.

New cards
4

Modulus math

________ uses division but only provides the remainder as the answer, not the quotient.

New cards
5

CAN_MOVE

________ can be used in an IF statement in your code to navigate through the maze.

New cards
6

single equals

In many programming languages, a(n) ________ sign,=, is used as the assignment operator.

New cards
7

Procedural abstraction

________: You only need to know the name of the procedure, the number and type of parameters, and the output to expect.

New cards
8

commands

There are four ________ you are responsible for understanding and using.

New cards
9

Algorithms

________ have the potential to solve many problems once the programs are written for them to run.

New cards
10

Readability

________ is important to help programmers understand a program.

New cards
11

MOD

________ is the symbol used for modulus math in many programming languages.

New cards
12

Pseudocode

________ can not run on computers and needs to be translated to a programming language to do so.

New cards
13

Variables

________ are placeholders for values a program needs to use.

New cards
14

triangle

The ________ represents the robots starting point and the direction it is facing.

New cards
15

Procedures

________ have an optional feature called a return statement.

New cards
16

decidable problem

A(n) ________ is one where an algorithm can be written that results in a correct "yes "or "no "answer for all inputs.

New cards
17

REPEAT

The code that is repeated is indented underneath the ________ statement and within the braces, { }, just like with the IF /ELSE statements.

New cards
18

Clarity

________ refers to how easy it is to understand.

New cards
19

Relational operators

________ are used with Boolean values.

New cards
20

INPUT

________): (It accepts data from the user, usually from the keyboard.

New cards
21

text fields

A program may need variables for numbers, both integers and real numbers, as well as ________ and Boolean values.

New cards
22

INSERT command

The ________ causes elements to the right of the indicated index position, i, to shift right one position to make room for the new element.

New cards
23

Expressions

________ are calculations to be evaluated to an answer or single value.

New cards
24

API documentation

The ________ provides the information needed to set up the interface and use the newly connected software.

New cards
25

algorithm

is a set of steps to do a task.

New cards
26

Natural language

________ is our native speaking and writing language, so it is much easier for people to use and understand.

New cards
27

Multiple expressions

________ can be combined using the logical operators AND, OR, and NOT.

New cards
28

Parameters

________ allow the calling program to send values to the procedure.

New cards
29

Heuristic approach

________: This is an approach that may not be optimal or the best but is close enough to use as a solution.

New cards
30

Data types

________ are the way computers assign some meaning to these binary digits.

New cards
31

languages

Programming ________ are very strict with their syntax, which is like their grammar and structure.

New cards
32

Boolean values

________ are one of the foundations of computer code.

New cards
33

API

________ stands for "Application Programming Interface ..

New cards
34

operator

For the OR ________, either or both of the operands can be true for the condition to be true.

New cards
35

Efficiency

________ can be determined by mathematically proving it and informally measured by actually running it on datasets of different sizes and measuring how long it took and the memory resources needed.

New cards
36

optimization problem

A(n) ________ is one that should find the best solution for the problem.

New cards
37

random numbers

Generating ________ is a frequently needed feature in programs.

New cards
38

Algorithms

________ are implemented with software.

New cards
39

Pseudocode

________ is used to map out a programs structure before beginning to write the code and uses a combination of natural and programming languages.

New cards
40

Variables

________ are data abstractions because we do not need to know the details of how and where the values are stored in memory.

New cards
41

Integers

________ are whole numbers.

New cards
42

text fields

Strings are ________ that are just a series of characters and are denoted with quotation marks around the string field.

New cards
43

Procedures

________ are also called functions in some programming languages.

New cards
44

algorithm

A(n) ________ is a set of steps to do a task.

New cards
45

Variables

________ can be used in expressions, both mathematical and textual.

New cards
46

Algorithms

________ can be written in several ways.

New cards
47

There are four main data types you should understand for the exam

strings, integers, real (fractional) numbers, and Booleans

New cards
48

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

New cards
49

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

New cards
50

LINEAR SEARCH

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

New cards
51

BINARY SEARCH

Binary searches are far more efficient than linear searches

New cards
52

Procedural abstraction

You only need to know the name of the procedure, the number and type of parameters, and the output to expect

New cards
53

Built-in Procedures

Built-in procedures are prewritten and tested code that are included with the programming language

New cards
54

DISPLAY()

DISPLAY() is a built-in procedure used for this course on the exam

New cards
55

INPUT()

It accepts data from the user, usually from the keyboard

New cards
56

Simulations

Simulations are designed to represent and mirror the real world for testing

New cards
57

Heuristic approach

This is an approach that may not be optimal or the best but is close enough to use as a solution

New cards
58

Natural language

is our native speaking and writing language, so it is much easier for people to use and understand.

New cards
59

Programming languages

are very strict with their syntax, which is like their grammar and structure.

New cards
60

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.

New cards
61

Flowcharting

helps to visualize how the program will be structured.

New cards
62

Clarity

refers to how easy it is to understand.

New cards
63

Readability

is important to help programmers understand a program.

New cards
64

Variables

are placeholders for values a program needs to use.

New cards
65

Data types

are the way computers assign some meaning to these binary digits.

New cards
66

Strings

are text fields that are just a series of characters and are denoted with quotation marks around the string field.

New cards
67

Integers

can be used in mathematical operations and expressions, whereas strings (text fields) cannot.

New cards
68

“Fractional” Numbers

These are numbers with a decimal point, even if a number has 0 (zero) for the decimal value, such as 52.0.

New cards
69

MOD

is the symbol used for modulus math in many programming languages.

New cards
70

Assignment Statements

To assign a value to a variable, the assignment operator is used.

New cards
71

Expressions

are calculations to be evaluated to an answer or single value.

New cards
72

Boolean Values

are one of the foundations of computer code.

New cards
73

Boolean expressions

can be simple or compound.

New cards
74

AND LOGICAL OPERATOR

To be true, both of the operands on either side of the AND operator must be true when evaluated individually.

New cards
75

OR LOGICAL OPERATOR

For the OR operator, either or both of the operands can be true for the condition to be true.

New cards
76

NOT LOGICAL OPERATOR

With the NOT operator, if a condition was true, then NOT makes it false.

New cards
77

Program Statements

All programs can be written using a combination of only three types of statements.

New cards
78

Sequential

These are statements that are executed as written in order in the program.

New cards
79

Selection Statements

These are a key component to many programs.

New cards
80

Iterative

are also referred to as repetitive statements or loops.

New cards
81

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.

New cards
82

REPEAT UNTIL (Condition) Loop

has a condition to evaluate at each iteration of the loop.

New cards
83

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.

New cards
84

Common Algorithms

Determining the maximum or minimum number from two or more numbers.

New cards
85

Robots

There are four commands you are responsible for understanding and using.

New cards
86

MOVE_FORWARD

One command the robot can follow is

New cards
87

CAN_MOVE

can be used in an IF statement in your code to navigate through the maze.

New cards
88

Lists

in a program can be a collection of numbers, words, phrases, or a combination of these.

New cards
89

List Indices

Individual items in a list are called elements and are accessed by position using an index.

New cards
90

Index positions

are always integers and are enclosed within square brackets [index].

New cards
91

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.

New cards
92

APPEND

command will add the new element to the end of the list, so no index position is needed.

New cards
93

REMOVE

command deletes the element at the provided index position and shifts the remaining elements one position to the left.

New cards
94

Traversing

a loop that will automatically repeat the code for each element in the list.

New cards
95

Searching

deals with finding the needed element from everything in the dataset or determining that it is not there.

New cards
96

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.

New cards
97

Binary searches

are far more efficient than linear searches.

New cards
98

Procedures

are also called functions in some programming languages.

New cards
99

Parameters

allow the calling program to send values to the procedure.

New cards
100

Procedural abstraction

You only need to know the name of the procedure, the number and type of parameters, and the output to expect.

New cards

Explore top notes

note Note
studied byStudied by 2 people
Updated ... ago
4.0 Stars(1)
note Note
studied byStudied by 7 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 21 people
Updated ... ago
4.5 Stars(2)
note Note
studied byStudied by 82 people
Updated ... ago
4.3 Stars(3)
note Note
studied byStudied by 8 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 1 person
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 11 people
Updated ... ago
5.0 Stars(1)
note Note
studied byStudied by 33265 people
Updated ... ago
4.9 Stars(62)

Explore top flashcards

flashcards Flashcard31 terms
studied byStudied by 19 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard54 terms
studied byStudied by 26 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard45 terms
studied byStudied by 184 people
Updated ... ago
5.0 Stars(4)
flashcards Flashcard48 terms
studied byStudied by 221 people
Updated ... ago
4.7 Stars(3)
flashcards Flashcard41 terms
studied byStudied by 1 person
Updated ... ago
4.0 Stars(1)
flashcards Flashcard35 terms
studied byStudied by 13 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard170 terms
studied byStudied by 16 people
Updated ... ago
5.0 Stars(1)
flashcards Flashcard168 terms
studied byStudied by 1895 people
Updated ... ago
4.6 Stars(5)