Exam 1 CS 1301 (Online) 2026, Joyner

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

1/90

encourage image

There's no tags or description

Looks like no tags are added yet.

91 Terms

1
New cards

line of code

a single instruction for the computer to perform

2
New cards

program

an independent collection of lines of code that serves one or more overall functions

3
New cards

input

data that is fed into a program for it to operate upon

4
New cards

output

what the computer provides in return after running some lines of code

5
New cards

compile

to translate human-readable computer code into instructions the computer can execute

6
New cards

execute

running some code and having it actually perform its operations

7
New cards

console

an output medium for a program to show exclusively text-based output

8
New cards

graphical user interface (GUI)

an output medium that uses more than just text, like forms, buttons, tabs, and more

9
New cards

computing

the basic principles of working with computers

10
New cards

programming

writing code through an iterative process of writing lines of code, attempting to execute them, and evaluating the results

11
New cards

debugging

resolving problems in code, whether it be errors thrown in compilation or running or mismatches between the desired and observed output

12
New cards

print

output some text to the console

13
New cards

boolean

a simple true or false value

14
New cards

compilation errors

errors that occur during the computer's read through of the code

15
New cards

runtime errors

errors that arise when trying to actually execute the code

16
New cards

nameError

an error that usually occurs when you use a variable name that doesn't yet exis

17
New cards

typeError

an error that occurs when we try to perform an operation on an object that doesn't make sense with the operation

18
New cards

attributeError

an error occurs when we ask for information about a variable that doesn't make sense

19
New cards

syntaxError

an error that occurs when the line of code we've written can't be read by the computer because it doesn't match the computer's expectation for the programming language's grammar

20
New cards

print debugging

a form of debugging where print statements are added throughout the code to check how the program is flowing

21
New cards

scope debugging

a form of debugging where print statements are added to check the status of the variables in the program at different stages to see how they are changing

22
New cards

rubber duck debugging

a form of debugging where the programmer explains the logic, goals, and operations to an inanimate listener to methodically step through the code

23
New cards

function

a segment of code that performs a specific task, sometimes taking some input and sometimes returning some output

24
New cards

method

a function that is part of a class in-object oriented programming (interchangeable with function)

25
New cards

object-oriented programming

a programming paradigm where programmers define custom data types that have custom methods embedded within them

26
New cards

event-driven programming

a type of programming where the program generally awaits and reacts to events rather than running code linearly

27
New cards

comments

notes from the programmer supplied in-line alongside the code itself, designated in a way that prevents the computer from reading or attempting to execute them as code

28
New cards

documentation

collected and set-aside descriptions and instructions for a body of code

29
New cards

self-documenting code

code whose variables and functions are named in a way that makes it clear what their underlying content and operations are to the reader

30
New cards

variables

alphanumeric (letters and numbers) identifiers that hold values, like integers, strings of characters, and dates

31
New cards

value

the content of some variable

32
New cards

null

the "value" a variable has when it doesn't actually have a value

33
New cards

data type

the type of content a variable holds, like an integer or a string of characters

34
New cards

str(variable)

takes as input some variable and returns a string representation of the variable's value

35
New cards

int(variable)

takes as input some variable (usually a string) and attempts to convert it to an integer, returning the integer if successful or raising a valueError if unsuccessful.

36
New cards

bool(variable)

takes as input some variable (usually a string) and attempts to convert it to a boolean, returning the boolean value if successful or raising a valueError if unsuccessful

37
New cards

float(variable)

takes as input some variable (usually a string) and attempts to convert it to a float, returning the float if successful or raising a valueError if unsuccessful

38
New cards

operators

specific, simple functions that act on primitive data types, like integers and strings

39
New cards

mathematic operators

operators that perform mathematical functions, such as adding two numbers together

40
New cards

logical operators

operators that perform logical operations, such as comparing relative values

41
New cards

relational operators

operators that check the relationships between multiple variables

42
New cards

numeric comparison operators

operators that facilitate numeric comparison between values (>, >=,

43
New cards

non-numeric equality comparisons

any kind of data, that is not numerical, that you can compare for equality

44
New cards

set operators

check to see if a value is a member of a set of multiple values

45
New cards

boolean operators

operators like "and" and "or" that act on pairs of boolean value, or that act on single boolean values like "not"

46
New cards

and

an operator that acts on two boolean values and evaluates to "true" if and only if both are true

47
New cards

or

an operator that acts on two boolean values and evaluates to "true" if and only if at least one is true

48
New cards

not

an operator that acts on one boolean value and evaluates it to the opposite value

49
New cards

truth tables

tables that map out the results of a statement in boolean logic, depending on the values of the individual variables

50
New cards

assignment operator

an operator that takes the output of an expression and assigns it to a variable

51
New cards

modulus

the remainder function, returns the remainder of one number divided by another

52
New cards

len( )

a function that takes as input a variable with a length, such as a string of characters or a list of items, and returns its length

53
New cards

self-assignment

a common programming pattern where a variable is assigned to the output of an expression that included the variable itself

54
New cards

increment

repeatedly adding a constant, typically one, to a variable

55
New cards

control structures

lines of code that control when other lines of code run

56
New cards

conditional statements

programming statements that control what code is executed based on certain conditions; usually of the form "if", "else if", and "else"

57
New cards

loop

a programming control structure that executes a segment of code multiple times

58
New cards

exception

an error that a program might want to anticipate and catch instead of outright avoiding

59
New cards

exception handling

a control structure that catches certain anticipated errors and reacts to them accordingly

60
New cards

indentation

spaces at the beginning of a line that are used to group together blocks of code. All consecutive lines of code at the same level of indentation are in a single code block

61
New cards

scope

the portion of a program's execution during which a variable can be seen and accessed

62
New cards

if-then statement

a conditional control structure that runs a block of code only if a certain condition is true

63
New cards

else statement

a conditional control structure that runs a block of code if all preceding if-then and else-if statements have been false

64
New cards

else-if statement

conditional control structure that runs a block of code if all preceding if-then and else-if statements have been false and some other conditions are met

65
New cards

nested conditional

a conditional statement that is itself controlled by another conditional statement

66
New cards

for loop

a loop control structure that runs a block of code a predetermined number of times

67
New cards

iteration

a single execution of a repeated task or block of code

68
New cards

while loop

a loop control structure that runs a block of code until a certain logical expression is satisfied

69
New cards

loop control variable

a variable whose value is the number of times a loop has run (used to check if the loop should keep running)

70
New cards

range(begin, end)

takes as input two variables, a first number and a last number, and provides the list of numbers for a for loop to iterate over

71
New cards

zero-indexing

first item in the sequence in the list is item 0

72
New cards

for-each loop

a loop control structure that runs a block of code a predetermine number of times, where the number of times comes from the length of some list and the items in the list are automatically loaded into a variable for usage in the block of code

73
New cards

iterate

to repeat code a number of times

74
New cards

continue

skip the rest of the current iteration of the loop and continue with the next iteration of the loop

75
New cards

break

skip the rest of the current iteration of the loop and break out of the loop altogether

76
New cards

pass

designate an 'empty' body for a control structure

77
New cards

function call

a place where a function is actually used in some code

78
New cards

function definition

a segment of code that creates a function, including its name, parameters, and code, to be used by other portions of a program

79
New cards

parameter

a variable for which a function expects to receive a value when called

80
New cards

function header

the name and list of parameters a function expects

81
New cards

function body

the code that a function runs when called

82
New cards

return statement

the line of code that defines what output will be sent back at the end of a function

83
New cards

arguments

values passed into parameters during a function call

84
New cards

parameter mismatch

we gave a function more or fewer parameters than it expected

85
New cards

scope error

we tried to use a variable in a function that was created outside the function or vice vers

86
New cards

keyword parameters

special kind of optional parameter to which the program may choose to assign an argument during a function call, or may ignore

87
New cards

catching errors

using error handling to prevent a program from crashing when an error is encountered

88
New cards

uncaught error

an error that is not handled by error handling code, and thus usually forces the program to crash

89
New cards

try statement

a control structure that sets aside a block of code in which an error might occur so that the computer will look for error handling capabilities

90
New cards

except statement

a control structure that designates what error it anticipates in a try block and provides the code to execute if that error arises

91
New cards

finally statement

a control structure that designates some code to run after a try and catch structure regardless of whether or not an error arose