Intro to Programming

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

1/104

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 10:36 PM on 10/4/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

105 Terms

1
New cards

Input

A program recieves data from a variety of types

2
New cards

Process

A program performs computations on input data

3
New cards

Output

A program puts the data somewhere

4
New cards

Program

Consists of instructions executing one at a time

5
New cards

Algorithm

A sequence of instructions that solve a problem

6
New cards

Interpreter

A program that executes computer code

7
New cards

Code

The text that represents a computer program

8
New cards

Statement

A program instruction. A program mostly consists of a series of instructions usually with each one appearing on it’s own line

9
New cards

Expression

A piece of code that the interpeter evaluates to produce a value such as a number

10
New cards

Variable

A named reference to a value stored by the interpreter, like wage, hours, weeks.

11
New cards

Print() Function

Function that displays variables or the result of expressions

12
New cards

String

Text enclosed in quotes, these may have letters, spaces or symbols

13
New cards

Newline Character

Output can be moved to the next line by using \n

14
New cards

input() Function

Function that is used to read input from a user

15
New cards

Type

Determines how a value can behave

16
New cards

int() Function

Function used to convert string to a integer

17
New cards

syntax error

Error that violates a programming language’s rules on how symbols can be combined to create a program

18
New cards

runtime error

Error in which a program’s syntax is correct but the program attempts an impossible operation

19
New cards

indentation error

Error when lines of the program are not properly indented

20
New cards

value error

Error when an invalid value is used, which can occur if giving letters to int()

21
New cards

name error

Error when the program tries to use a variable that does not exist

22
New cards

type error

Error when an operation uses incorrect types, which can occur if adding an integer to a string

23
New cards

Integrated Development Enviorment (IDE)

Software that integrates a text editor and a python interpeter, often with additional tools

24
New cards

Console (Terminal)

A text based interface that allows a user to run programs, enter programs, enter input, and view a program output

25
New cards

Object

Represents a value and is automatically created by the interpreter when executing a line of code

26
New cards

type() Function

Function that returns the type of an object

27
New cards

Mutability

Whether an object’s value can be changed after it is created

28
New cards

Immutable

An object value cannot be changed after it is created, this includes strings and integers

29
New cards

id() Function

Function that gives the value of an object’s identity

30
New cards

float() Function

Function that converts an integer or a numeric string into a floating point number, which can contain decimals

31
New cards

overflow error

Error that occurs when a value is too large to be stored in the memory allocated by the interpreter

32
New cards

NotImplementedError

Error that occurs to immediately stop a program if an unfinished function get called

33
New cards

Operator

A symbol that performs a built in calculation (-, +, , /, **)

34
New cards

Compound Operators

Special operator that provide a shortcut way to update a variable (+=, -=, /=, *=, %=)

35
New cards

Floor Division Operator : //

Special operator that can be used to round down the result of a floating point division to the closest smaller whole number value.

36
New cards

Modulo Operator : %

Special operator that can be used to evaluate the remainder of the division of two integer operands

37
New cards

Script

A file containing python code that is passed as input to the interpreter

38
New cards

random() Function

Function that returns a random floating point value each time the function is called

39
New cards

randrange() Function

Function that generates random integers within a specified range

40
New cards

Escape Sequence

A backslash followed by a character that represents a special character (\n for a new line, \t for a tab)

41
New cards

ord() Function

Function returns an encoded integer value for a string of length one

42
New cards

chr()

Function returns a string of one character for an encoded integer

43
New cards

String literal

String defined in the source code of a program by surrounding the text value with single or double quotes

44
New cards

len Function

Function can be used to find the length of a string

45
New cards

String Indexing

One can use brackets ([]) to reference a character at a specific index

46
New cards

String Concatenation

The process of joining strings together using the + operator to generate a new string. Non-string values must be converted using str() first to prevent errors.

47
New cards

List = [x,y,z]

A mutable, ordered collection of items that can hold elements of various data types

48
New cards

Index

An integer that specifies the position of an element within a list

49
New cards

Container

A data structure that holds and organizes multiple elements, allowing for easy storage and retrieval

50
New cards

Element

An individual item stored within a list

51
New cards

Method

Instructs an object to perform an action. Written using the object name, a dot . symbol, and the instuction name

52
New cards

.append()

List method that is used to add new elements to a list

53
New cards

.pop()

List method that is used to remove the element at index i from a list

54
New cards

.remove(v)

List method that is used to remove the first element whose values matches

55
New cards

Tuple = (x,y,z)

Stores a collection of data, like a list but is immutable, so elements cannot be changed

56
New cards

Set = {x,y,z}

An unordered collection of unique elements, with this elements located here do not have a position or index and no elements share the same value

57
New cards

set() Function

Function that accepts a sequence type iterable object (list, string, tuple, etc.) whose elements are inserted into a set (immutable)

58
New cards

Set literal

A sequence of unique values enclosed in curly braces {}. The sets are unordered and automatically remove duplicate elements.

59
New cards

Dictionary = {x:y}

Stores an associative collection of key-value pairs. Keys must be immutable (like strings, numbers, or tuples), while values can be any data type

60
New cards

Branch

A sequence of statements only executed under a certain condition

61
New cards

if Branch

Type of branch taken only “if an expression is true

62
New cards

if-else Branch

Type of branch where first branch is executed “if an expression is true, “else” the other branch is executed

63
New cards

if-else-else Branch

An if-else branch can be extended, each expression is checked in sequence until one branch is found to be true

64
New cards

Equality Operator (==)

Special operator that evaluates to true if the left and right side are equal

65
New cards

Inequality Operator (!=)

Special operator that evaluates to ture if the left and right sides are not equal, or different

66
New cards

Boolean

A data type that has only two possible values; True or False

67
New cards

elif

A keyword meaning "else if" for adding extra branches. Expressions are checked in sequence: the first true branch executes (skipping the rest), and if none are true, the else branch executes

68
New cards

Relational Operator

Special operators that check how one operand’s value relates to another (<, >, <=, >=)

69
New cards

Operator Chaining

Performs multi comparisons and evaluates it left to right (a<b<c)

70
New cards

Logical Operator

Treats operands as being true or false. This includes AND, OR, and NOT. (AND: True when both of its operands are true) (OR: True when at least one of its two operands are true) (NOT: True when its one operand is False, and vice versa)

71
New cards

Nested if-else

An if-else statement placed inside another if or else branch, allowing for multi-level conditions where inner checks only run if outer conditions are met

72
New cards

Membership Operators

Includes the “in” and “not in” operator, which yield true or false if the left operand matches the value of an element in the right operand which is always a container

73
New cards

Identity Operators

Includes the “is” and “is not” operators, which yield True or False depending on whether two operands reference the exact same object in memory rather than comparing their values

74
New cards

Code Block

Series of statements grouped together, defined by it’s indentation level

75
New cards

Loop

A block of code that keeps repeating its instructions as long as a condition is true, and stops once that condition turns false. Running through the code one time is called an iteration

76
New cards

While Loop

Repeatedly runs a block of code as long as its condition is true, stopping once the condition becomes false. Each execution of the loop is called an iteration

77
New cards

Sentinel Value

A value that causes a loop to end

78
New cards

randint() Function

Function that provides a new random number each time the function is called

79
New cards

Loop Variable

A variable updated during each iteration to track or count progress until the loop condition becomes False. Forgetting to update it can cause an infinite loop

80
New cards

for loop

Goes through a collection (like a list, string, or dictionary) one item at a time, assigning each item to a variable so you can work with it in the loop body

81
New cards

range() Function

Generates a sequence of numbers starting from a start value up to (but not including) an end value, stepping by a set amount. To include the ending number, add +1 to the end value

82
New cards

For Loop vs While Loop

Use a for loop when you know in advance how many times to repeat (or when iterating over a fixed collection), and use a while loop when you don't know the number of loops and need to repeat until a specific condition becomes false

83
New cards

Nested loop

A loop that appears as part of the body of another loop. These are commonly recalled as outer and inner loop

84
New cards

Break

A statement in a loop that causes the loop to exist immediately. It can sometimes yield a loop that is easier to understand

85
New cards

Continue

A statement in a loop that causes an immediate jump to the while or for loop header statement. It can help improve readability of a loop

86
New cards

Loop else

A block of code attached to a loop that executes only after the loop completes all its iterations naturally (without hitting a break statement)

87
New cards

enumerate() Function

Function retrieves both the index and corresponding element value at the same time, providing a cleaner solution

88
New cards

Unpacking

Splitting elements from a sequence (like a tuple or list) into multiple individual variables all at once in a single step

89
New cards

def

A keyword that is used to create new functions

90
New cards

Return Statement

Allows for a function to return one value

91
New cards

Void Function

A function with no return statement and such a function returns the value “None”

92
New cards

Parameter

A function input specified in a function definition

93
New cards

Argument

A value provided to a function’s parameter during a function call

94
New cards

Polymorphism

When an operator or function changes how it works depending on the kind of data you give it

95
New cards

Dynamic Typing

Used by Python to automatically determine a variable's data type while the program runs, allowing its type to change whenever you assign it a new kind of value

96
New cards

Modular Development

The process of dividing a program into separate modules that can be developed and test separately and integrated into a single program

97
New cards

Pass

A keyword that performs no operation except to act as a placeholder for a required statement((

98
New cards

Function Stubs

Placeholder functions with no real code inside yet, used to outline how a program will work before writing the full details

99
New cards

Bytecode

A simplified version of your code created behind the scenes by Python so the computer can process and run it faster

100
New cards

Scope

The specific region of code where a variable is created and can be accessed such as inside a function (local) or across the entire file (global)