Notre Dame Fundamentals of Computing - Placement Test Study Guide

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

1/74

flashcard set

Earn XP

Description and Tags

Comprehensive vocabulary flashcards covering logic gates, control flow, programming language conventions, variables, arrays, patterns, functions, scope, errors, and number systems from the Notre Dame Fundamentals of Computing Placement Test Study Guide.

75 Terms

1
New cards

Boolean

A value that is either true (1) or false (0).

2
New cards

AND gate

Output is true only when BOTH inputs are true.

3
New cards

OR gate

Output is true when AT LEAST ONE input is true.

4
New cards

NOT gate

Flips the input. True becomes false, false becomes true.

5
New cards

XOR gate (exclusive or)

Output is true when the inputs are DIFFERENT (exactly one is true).

6
New cards

NAND gate

NOT AND. Output is false only when both inputs are true.

7
New cards

NOR gate

NOT OR. Output is true only when both inputs are false.

8
New cards

XNOR gate

NOT XOR. Output is true when the inputs are the SAME.

9
New cards



10
New cards

Order of operations for logic

NOT first, then AND, then OR. Use parentheses to be safe.

11
New cards

De Morgan's Law 1

NOT(A AND B)=(NOT A) OR (NOT B)\text{NOT}(A \text{ AND } B) = (\text{NOT } A) \text{ OR } (\text{NOT } B)

12
New cards

De Morgan's Law 2

NOT(A OR B)=(NOT A) AND (NOT B)\text{NOT}(A \text{ OR } B) = (\text{NOT } A) \text{ AND } (\text{NOT } B)

13
New cards

Double negation

NOT(NOT A)=A\text{NOT}(\text{NOT } A) = A

14
New cards

Identity rules

A AND true=AA \text{ AND } \text{true} = A and A OR false=AA \text{ OR } \text{false} = A.

15
New cards

Domination rules

A AND false=falseA \text{ AND } \text{false} = \text{false} and A OR true=trueA \text{ OR } \text{true} = \text{true}.

16
New cards

Short-circuit evaluation

In A AND BA \text{ AND } B, if AA is false, BB is never evaluated. In A OR BA \text{ OR } B, if AA is true, BB is never evaluated.

17
New cards

Truthiness

In many languages, 0 counts as false and any nonzero value counts as true.

18
New cards

Conditional (if statement)

Runs a block of code only if a condition is true.

19
New cards

if / elseif / else chain

Only ONE branch runs: the first one whose condition is true. If none are true, else runs.

20
New cards

Condition

An expression that evaluates to true or false.

21
New cards

= vs ==

= assigns a value (x=5x = 5). == compares two values (x==5x == 5).

22
New cards

Loop

Code that repeats multiple times.

23
New cards

Iteration

One single pass through a loop.

24
New cards

For loop

Repeats a known number of times, usually counting through a range.

25
New cards

While loop

Repeats as long as its condition is true. Checks the condition BEFORE each pass, so it may run zero times.

26
New cards

Nested loop

A loop inside another loop. The inner loop finishes completely for every one iteration of the outer loop.

27
New cards

Nested loop count

If the outer loop runs 3 times and the inner runs 4 times, the inner body runs 3×4=123 \times 4 = 12 times.

28
New cards

break

Exits the loop immediately.

29
New cards

continue

Skips the rest of the current iteration and jumps to the next one.

30
New cards

Infinite loop

A loop whose condition never becomes false, so it never stops.

31
New cards

Loop counter

A variable that tracks which iteration the loop is on (often i, j, k).

32
New cards

Accumulator

A variable that builds up a result across loop iterations (for example, total = total + i).

33
New cards

Zero-indexing

The first element is at position 0. Used by Python.

34
New cards

One-indexing

The first element is at position 1. Used by MATLAB.

35
New cards

Inclusive range

The end value is included in the range (e.g., MATLAB 1:5 gives 1, 2, 3, 4, 5).

36
New cards

Exclusive range

The end value is NOT included in the range (e.g., Python range(5) gives 0, 1, 2, 3, 4).

37
New cards

Off-by-one error

A mistake caused by being wrong by exactly one, usually from indexing or range boundaries.

38
New cards

Variable

A named storage location that holds a value.

39
New cards

Assignment

Storing a value in a variable. The right side is evaluated first, then stored in the left side.

40
New cards

Modulo (mod or %)

Gives the remainder after division (for example, 7 mod 3 = 1).

41
New cards

Integer division

Division that drops the decimal part (for example, 7 // 3 = 2).

42
New cards

Array (or list)

An ordered collection of values stored under one name.

43
New cards

Index

The position of an element in an array.

44
New cards

Element or value

The data stored at a given index. The index is NOT the same as the value.

45
New cards

Array length

The number of elements in the array.

46
New cards

Traversal

Looping through every element of an array.

47
New cards

String

A sequence of characters, like text.

48
New cards

Concatenation

Joining two strings together.

49
New cards

Sum pattern

Set total = 0, loop through the array, add each element to total.

50
New cards

Count pattern

Set count = 0, loop through, add 1 to count whenever a condition is true.

51
New cards

Max pattern

Set max = first element, loop through, if element > max then max = element.

52
New cards

Min pattern

Set min = first element, loop through, if element < min then min = element.

53
New cards

Reverse pattern

Swap the first and last elements, then the second and second to last, and so on until you reach the middle.

54
New cards

Linear search

Loop through each element and check if it matches the target.

55
New cards

Function

A reusable block of code that can take inputs and give back an output.

56
New cards

Parameter

A variable in the function definition that receives an input.

57
New cards

Argument

The actual value passed into the function when it is called.

58
New cards

Return value

The output a function sends back to where it was called.

59
New cards

Function call

Running a function by using its name with arguments.

60
New cards

Scope

The part of a program where a variable can be accessed.

61
New cards

Local variable

A variable created inside a function. It cannot be used outside that function.

62
New cards

Global variable

A variable created outside all functions, accessible in many places.

63
New cards

Algorithm

A step-by-step procedure for solving a problem.

64
New cards

Pseudocode

Plain-language code that describes logic without strict syntax of a real language.

65
New cards

Debugging

Finding and fixing errors in code.

66
New cards

Syntax error

A mistake in how the code is written (breaks the language rules).

67
New cards

Logic error

Code runs but gives the wrong result because the logic is flawed.

68
New cards

Runtime error

An error that happens while the program is running, such as an index out of range.

69
New cards

Recursion

When a function calls itself. Needs a base case to stop.

70
New cards

Base case

The condition in a recursive function that stops further calls.

71
New cards

Binary

Base 2. Uses only digits 0 and 1.

72
New cards

Decimal

Base 10. Uses digits 0 through 9.

73
New cards

Hexadecimal

Base 16. Uses digits 0-9 and letters A-F (A = 10, F = 15).

74
New cards

Bit

A single binary digit (0 or 1).

75
New cards

Byte

8 bits.