CS 1110 Prelim 1

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

1/26

flashcard set

Earn XP

Description and Tags

Key terms for CS 1110 Prelim 1

Last updated 8:49 PM on 10/12/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

27 Terms

1
New cards

Argument

Expression that appears within parentheses of function call. Python will evaluate this expression and copy its values into the appropriate parameters.

2
New cards

Assert Statement

Statement of the form: assert <boolean-expression> or assert <boolean-expression>, <string-expression>. If the boolean expression is true, an assert statement does nothing. If it is false, it produces an error and crashes Python.

3
New cards

Assignment Statement

<variable> = <expression>

If the variable does not exist yet, it creates the variable and stores the value of the expression inside. If the variable exists, the old value is replaces with the value of the expression.

4
New cards

Attribute

Variable stored inside of an object that can often be modified.

5
New cards

Call Frame

Formal representation of what Python uses when executing a function call. It contains the name of the function as well as all parameters and local variables. It also has an instruction counter that tracks the next line in the function that is to be executed. A call frame is deleted as soon as the call completes.

6
New cards

Call Stack

All the call frames of the currently executing function calls

7
New cards

Class

Any type not built into Python

8
New cards

Conditional Statement

if <boolean-expression>:

| <statement>

9
New cards

Constructor

Function that creates a mutable object. It puts the object in heap space and returns the name of the object so you can store it in a variable.

10
New cards

Expression

Python code that produces a value. Must be put inside of a statement.

11
New cards

Function

Parameterized sequence of statements, whose execution performs some task. Should be followed by a docstring ('“““…”””) that is precise and clear.

12
New cards

Fruitful function

Function that performs some task and returns a value

13
New cards

Function call

Invocation of a function with arguments. These arguments are placed into the parameter variables, and the body of the function is executed.

14
New cards

Function Header

the first line of a function definition. it includes the keyword def, the function name, parentheses, any parameters, and a colon.

15
New cards

Global space

area of memory that stores any variable not defined in the body of a function. Variables remain until explicitly erased or Python is quit.

16
New cards

The Heap

area of memory that stores mutable objects. it also stores function definitions and the contents of modules imported.

17
New cards

Literal

a literal is an expression, that when evaluated, evaluates to itself. An expression that is also a value

18
New cards

Method

Functions stored inside of an object.

19
New cards

Object

A value whose type is a class. Typically contain attributes which are variables inside of the object.

20
New cards

Print statement

print(<string-expression>)

21
New cards

Procedure

A function that performs some type of task and doesn’t return a value.

22
New cards

Return statement

return <expression>

23
New cards

Scope

Set of places in which a variable name can be referenced. global variables can be referenced by any function that is defined in the same module as the global variable or which imports that module. the scope of a parameter or local variable is the body of the function in which it is defined.

24
New cards

Specification

description of what a function should do. includes preconditions on the arguments, the return value, and any other details

25
New cards

Statement

command for Python to do something (assignment statements, return statements, assert statements, conditional-statements, import statements, procedures)

26
New cards

Type

set of values and the operations on them

27
New cards

Variable

named box that contains a value