Intro Python Terms Flashcards
Define String
The sequence of characters enclosed within single quotes, double quotes, or triple quotes.
Integer
A whole number (positive, negative, or zero) without any decimal component
Type Conversion
The process of changing the data type (type casting) of a value from one type to another.
- Types of type conversion (implicit/explicit)
String Type
Used to represent a sequence of characters.
Variable Type
Refers to the kind of data that a variable can hold. [Python is dynamically typed, meaning that the type of variable is determined of runtime based on the value assigned to it.]
Variable Value
The data stored in a variable. Variable is like a container that holds a piece of info and the value is the actual data stored in that container.
Increment a Variable Value
Increasing its value by a certain amount, (Usually 1)
- Using the (+=) operator [most common]
Decrement a Variable Value
Decreasing its value by a specified amount (Usually 1)
Float (decimal)
Represents a floating point #, which is a way to represent real numbers with a decimal component.
Mod Operator
(%) returns the remainder of (modulo) dividing the left operand by the right operand
PNEMDmAS
Specifies the sequence in which operations are performed in an expression.
(parentheses, negation, exponents, multiplication, division, mod, addition, subtraction)
Compounded Math Operations
Usually refers to compound assignment ops. These ops combo on arithmetic operation, allowing you to perform calculations and update a variable in one step.
Pythons round function
Built in function that takes a number rounded to a specified number of a decimal place, or to the nearest integer if no decimal places are provided
Boolean values
Presents one of the possible states: true or false, (bool.) used in logical, OPS comparisons, and conditional statements to the control the flow of the program.
Conditionals
Statements that allow you to ctrl the flow of your program based on whether a certain condition is true or false. They help you make decisions in your code.
-if statement = executes a block of code only if the specified condition is true
Traceback
A record of where the interpreter ran into trouble when trying to execute your code.
Syntax Highlighting
When the editor displays different parts of the program in different ways.
(I.e: Displaying of both coding/non-coding words in different colors)