Send a link to your students to track their progress
27 Terms
1
New cards
Variable
A name item, such as x or num_people, used to hold a value
2
New cards
Assignment Statement
Assigns a variable with a value, such as x = 5. Left side must be a variable, the right side can be an expression. Assigns the variable on the left-side of the = with the current value of the right-side expression.
3
New cards
Incrementing
Increasing a variable's value
4
New cards
Identifier
Also called a name, a sequence of letters (a-z, A-Z), underscore(_), and digits (0-9), and must start with a letter or an underscore.
5
New cards
Case Sensitive
Meaning upper- and lowercase letters differ.
6
New cards
Reserved Words/Keywords
Words that are part of the language, and thus, cannot be used as a programmer-defined name.
7
New cards
Bits
A single 0 or 1
8
New cards
Byte
Eight bits, like 11000101
9
New cards
Character
A letter, symbol, or single digit number.
10
New cards
ASCII
Stands for American Standard Code for Information Interchange. A popular code for characters developed in 1963. Uses 7 bits per code, and has codes for 95 characters.
11
New cards
Unicode
Character encoding standard, whose codes can have more bits than ASCII and thus can represent over 100,000 items, such as symbols and non-English characters.
12
New cards
Integer
Can hold whole number values, like 1, 999, 0, -25.
13
New cards
Floating-point number
A real number, like 98.6, 0.0001, or -666.667. Refers to the decimal point being able to appear anywhere ("float") in the number.
14
New cards
Floating-point literal
Written with the fractional part even if that fraction is 0, as in 1.0, 0.0, or 99.0
15
New cards
Scientific Notation
Written using an e preceding the power-of-10 exponent, as in 6.02e23 to represent 6.02x10^23. The e stands for exponent.
16
New cards
OverflowError
Occurs when a value is too large to be stored in the memory allocated by the interpreter.
17
New cards
Raw string
Can be created by adding an 'r' before a string literal.
18
New cards
ord()
Returns an encoded integer value for a string of length one.
19
New cards
chr()
Returns a string of one character for an encoded integer.
20
New cards
Expression
A combination of items, like variables, literals, operators, and parentheses, that evaluates to a value, like 2 * (x + 1).
21
New cards
Literal
Specific value in code like 2.
22
New cards
Operator
a symbol that performs a built-in calculation, like +, which performs addition.
23
New cards
Unary Minus
Minus (-) used as negative.
24
New cards
Compound operators
Provide a shorthand way to update a variable, such as age += 1 being shorthand for age = age + 1. Other compound operators include -=, *=, /=, and %=
25
New cards
Module Operator (%)
Evaluates the remainder of the division of two integer operands.
26
New cards
Division (/): Integer rounding
The division operator / performs division and returns a floating-point number.
27
New cards
Floor Division (//)
Used to round down the result of a floating-point division to the closest smaller whole number value. The resulting value is an integer type if both operands are integers; if either operands is a float, then a float is returned.