ENGI-1020 Lecture 3: Literals and Operators

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

1/20

flashcard set

Earn XP

Description and Tags

Vocabulary flashcards covering core Python concepts from ENGI-1020 Lecture 3, including expressions, numeric/string/Boolean literals, variables, functions, operator categories, and precedence.

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

No analytics yet

Send a link to your students to track their progress

21 Terms

1
New cards

Expression

A combination of values and operators that evaluates to a single result.

2
New cards

Literals

Built-in primitive types (building blocks) in Python that contain a pure simple value and literally mean what they say.

3
New cards

Integer Literal

A numeric literal that represents whole numbers, which can be formatted conventionally (e.g., 11, 5656), with underscores (e.g., 1_000_0001\_000\_000), or in other bases such as binary (0b101100\text{b}10110), octal (0o210\text{o}21), and hexadecimal (0x12c0\text{x}12\text{c}).

4
New cards

Float Literal

A numeric literal representing real numbers written with decimals or scientific notation (e.g., 3.143.14, 2e252\text{e}25), which can be subject to round-off errors due to fundamental computer limitations in floating-point arithmetic.

5
New cards

Imaginary Literal

A literal representing the imaginary part of a complex number, formed by appending a jj suffix to an integer or floating-point prefix (e.g., 1j1\text{j}, 1.0j1.0\text{j}).

6
New cards

Complex Expression

An expression representing a full complex number (such as 1+2j1 + 2\text{j}) produced by adding a real number literal and an imaginary literal.

7
New cards

String Literal

A literal composed of characters enclosed by matching pairs of single or double quotation marks.

8
New cards

Boolean Literal

Case-sensitive primitive values in Python that represent truth values: True and False.

9
New cards

Variable

A named value stored for use in a program.

10
New cards

Function

A block of code that only runs when it is called; it can accept parameters (input data) and return data as a result.

11
New cards

Module

A file containing Python code that can be imported into other implementations.

12
New cards

Operators

Special symbols or keywords used to perform operations on values and variables.

13
New cards

Integer Division Operator (////)

An arithmetic operator (also called floor division) that divides two numbers and returns the quotient rounded down to the nearest whole integer.

14
New cards

Modulo Operator (%\%)

An arithmetic operator that yields the remainder of dividing one number by another.

15
New cards

Operator Precedence

The set of rules (such as BEMDAS or PEMDAS) specifying the execution order of different operators within an expression.

16
New cards

Exponentiation Associativity

The right-to-left evaluation order used as a tie-breaker for the power operator (∗∗**), meaning 2∗∗3∗∗22 ** 3 ** 2 evaluates as 2(32)=29=5122^{(3^2)} = 2^9 = 512.

17
New cards

Assignment Operators

Operators used to assign values to variables, including basic assignment (==) and compound shortcuts (such as +=+=, −=-=, ∗=*=, /=/=, ∗∗=**=, and %=\%=).

18
New cards

Comparison Operators

Operators (<<, >>, <=<=, >=>=, ====, !=!=) that evaluate relationships between numerical operands and produce a Boolean result (True or False).

19
New cards

Logical Operators

Operators (and, or, not, and ^ / xor) whose operands and evaluated results are Boolean values.

20
New cards

Membership Operators

Operators (in and not in) that determine whether a specific value exists within a sequence (such as a string or list), returning a Boolean value.

21
New cards

Bitwise Operators

Operators (&\&, ∣|, ^, ∼\sim, <<<<, >>>>) that perform low-level operations directly on the binary bits of integer operands and return integer values.