1/24
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
Python Interpreter
Translates code line by line into machine code, running it through the CPU.
Python IDLE
An interface used to run command line interface code; includes a blank editor and a Python shell.
Function Definition Syntax
Functions are defined using the keyword 'def', followed by the function name and parentheses.
Formal Parameter
A variable defined in a function's parameter list that can take input values.
String Literals
Fixed string values assigned to parameters when a function is called.
Print Function
Used to display outputs; can combine multiple data types including variables and strings.
Type Function
Checks the data type of a variable and returns the result.
Input Function
Stores user inputs as strings, prompting for input display.
Int Function
Converts strings to integers, turning text input into number data.
Float Function
Converts strings to floating-point numbers.
Str Function
Converts other data types into strings.
.format Method
Used to concatenate strings and variables in a formatted way.
Return Statement
Returns the result of a function's computations back to the caller.
List Length Function (len)
Returns the number of elements in a list.
List Append Method
Adds a single item to the end of a list.
List Clear Method
Removes all items from a list.
For Loop
Used to iterate over a sequence such as a list.
Range Function
Generates a sequence of numbers, allowing for iteration.
Sorted Function
Sorts a list or an iterable in ascending order by default.
Data Types
Different categories of data like strings, integers, floats, booleans, and lists.
Boolean Type
Represents truth values: True or False.
Variable Naming Rules
Variables cannot start with a digit and must be case sensitive.
Parameters in Functions
Formal parameters are defined in the function, while arguments are the values passed to them.
Static Variables
Constant variables typically defined globally and written in capital letters.
Comments (#)
Used to create notes in code that have no effect on execution.