Algorithms and Programming Flashcards

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

1/26

flashcard set

Earn XP

Description and Tags

Flashcards covering key vocabulary terms and concepts from the Algorithms and Programming lecture notes.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

27 Terms

1
New cards

Programming Language Structures

All programming languages use similar programming structures and commands.

2
New cards

Big Idea 3

Focuses on the efficiency of algorithms, writing algorithms, and implementing algorithms using Pseudo-Code.

3
New cards

Pseudo-Code

A simple way to represent an algorithm or program, easily written and modified, and understandable by anyone.

4
New cards

Variable

An abstraction inside a program that can hold a value, with associated data storage representing one value at a time.

5
New cards

Variable Value

The most recent value assigned to a variable.

6
New cards

Boolean

Data type appropriate for representing true/false values.

7
New cards

List

An ordered sequence of elements.

8
New cards

String

An ordered sequence of characters.

9
New cards

x  aList[i]

Assigns the value of aList[i] to the variable x.

10
New cards

aList[i]  aList[j]

Assigns the value of aList[j] to aList[i].

11
New cards

LENGTH(aList)

Evaluates to the number of elements in aList.

12
New cards

INSERT (aList, i, value)

List is increased by 1, and value is placed at index i in aList.

13
New cards

APPEND(aList, value)

The length of aList is increased by 1, and value is placed at the end of aList.

14
New cards

REMOVE (aList, i)

Removes the item at index i in aList and shifts to the left any values at indices greater than i. The length of aList is decreased by 1.

15
New cards

APPEND(list, item)

Adds item to the end of list, increasing the length of list by 1.

16
New cards

INSERT(list, i, item)

Inserts the item at the 1-based index i, and shifts any items after to the right. The length of the list increases by one.

17
New cards

REMOVE(list, i)

Removes the item at the 1-based index i, and shifts any items after to the left. The length of the list decreases by one.

18
New cards

RANDOM (a, b)

Returns a random integer from a to b, including a and b. Each result is equally likely to occur.

19
New cards

concat(str1, str2)

Returns a single string consisting of str1 followed by str2.

20
New cards

prefix(str, length)

Returns the first length characters of str or str if length is greater than the number of characters in str.

21
New cards

substring(str, start, length)

Returns the characters with the string at start position and the given length of characters.

22
New cards

len(str)

Returns the number of characters in str

23
New cards

PROCEDURE procedureName (parameter1, parameter2,…)

Procedures are called.

24
New cards

Conditionals - IF and ELSE

It makes decisions using Boolean Expressions inside Conditionals statements, in other words, it can respond differently depending on the different inputs and parameters.

25
New cards

ELSE statement

It allows programs to execute a different set of instructions when the condition statement is FALSE.

26
New cards

Nested Conditionals

A programming construct where one conditional statement is embedded within another conditional statement.

27
New cards

Iteration-Loops

Computer program that repeats to accomplish some task.