Python Lecture Notes: Variables, Expressions, and Statements

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

1/17

flashcard set

Earn XP

Description and Tags

Practice flashcards covering vocabulary and core concepts from Chapter 2: Variables, Expressions, and Statements.

Last updated 10:03 AM on 5/14/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

18 Terms

1
New cards

Constants

Fixed values such as numbers, letters, and strings whose values do not change.

2
New cards

Reserved Words

Specific identifiers like 'if', 'else', 'import', and 'class' that cannot be used as variable names because they have special meaning to Python.

3
New cards

Variable

A named place in the memory where a programmer can store data and later retrieve it using the assigned name.

4
New cards

Variable Naming Rules

Rules stating that names must start with a letter or underscore, consist of letters, numbers, and underscores, and are case sensitive.

5
New cards

Mnemonic

A memory aid; in programming, choosing variable names that help the programmer remember what is intended to be stored in them.

6
New cards

Assignment Statement

A statement using the == operator that evaluates an expression on the right-hand side and stores the result in a variable on the left-hand side.

7
New cards

Operator Precedence

The set of rules defining the order of evaluation in an expression, typically following the sequence: Parentheses, Power, Multiplication/Division, and Addition/Subtraction.

8
New cards

Multiplication Operator

The asterisk (*) symbol used in Python to multiply two values.

9
New cards

Power Operator

The double asterisk (**) symbol used in Python for exponentiation to raise a number to a power.

10
New cards

Remainder Operator

The percent sign (%\text{)} symbol used to calculate the remainder of a division.

11
New cards

Concatenate

To join or put together strings using the ++ operator.

12
New cards

type()

A built-in Python function used to identify whether a value or variable is an integer, floating point number, or string.

13
New cards

Integers

A numeric type representing whole numbers without decimal parts, such as 14-14, 00, and 100100.

14
New cards

Floating Point Numbers

A numeric type representing numbers that have decimal parts, such as 98.698.6 and 14.014.0.

15
New cards

int()

A built-in function used to convert a value, such as a string or float, into an integer.

16
New cards

float()

A built-in function used to convert a value, such as an integer or string, into a floating point number.

17
New cards

input()

A function that pauses program execution to read data from the user and returns that data as a string.

18
New cards

Comments

Text in a program starting with a hash sign (#) that is ignored by Python and used to document code or explain its purpose.