Python basics vocab

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/33

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

34 Terms

1
New cards

Expression

a combination of items, like variables, literals, operators, and parentheses

2
New cards

Literal

a fixed value used in code, such as a number, string, or boolean that is directly written in the program

3
New cards

Operator

a symbol that tells the interpreter to perform specific mathematical, logical, or relational operations on operands.

4
New cards

value

a specific piece of data that can be stored in a variable or used in an expression, such as a number, string

5
New cards

float

a data type in Python used to represent real numbers that include a decimal point. It can represent both positive and negative numbers.

6
New cards

integer

a data type in Python used to represent whole numbers, both positive and negative, without any fractional component.

7
New cards

string

a data type in Python used to represent a sequence of characters, often enclosed in single or double quotes. Strings can include letters, numbers, and symbols.

8
New cards

evaluates

describes the process of determining the value of an expression or code in Python, executing it to produce a result.

9
New cards

precedence rules

the guidelines that determine the order in which different operations are evaluated in an expression. They dictate which operations take priority over others, affecting how the expression is calculated. These rules influence the outcome of expressions involving multiple operators, ensuring correct and expected calculations.

10
New cards

unary minus

an operator indicating that a number should be treated as negative, effectively changing its sign. In Python, this operator is often applied to numeric types for arithmetic operations. It allows the negation of a value, making it useful for expressions requiring negative numbers.

11
New cards

compound operators

operators that combine an arithmetic operation with assignment, allowing for more concise code. An example is +=, which adds a value to a variable and assigns the result back to that variable.

12
New cards

function

a block of reusable code that performs a specific task. Functions help organize and structure code, allowing for modular programming by enabling the grouping of related operations under a single name and invoking them as needed.

13
New cards

function definition

a description of the input parameters and outputs for a specific function, outlining its purpose and usage within a program.

14
New cards

function call

the action of invoking a defined function in a program by specifying its name and providing the necessary arguments. This executes the code within the function and returns any output.

15
New cards

return statement

a special statement in a function that exits the function and optionally sends a value back to the caller, allowing the function to produce output.

16
New cards

None

a keyword in Python used to exit a function and return a value to the caller, enabling the function to produce output based on its operations.

OR

special keyword that indicates no value

17
New cards

parameter

a function input specified in a function definition

18
New cards

argument

a value provided to a function's parameter during a function call

19
New cards

assignment

the process of assigning a value to a variable in Python, allowing the storage and retrieval of data

20
New cards

prompt

a message displayed to ask the user for input, often used in functions to guide user interaction

21
New cards

interpreter

a program that reads and executes Python code line by line, allowing for immediate feedback and debugging.

22
New cards

code

a common word for the textual representation of a program

23
New cards

variable

a named storage location in memory that can hold different values during program execution, allowing for data manipulation and retrieval.

24
New cards

new line character

a special character used in programming to indicate the end of a line and the start of a new line, typically represented as '\n' in Python.

25
New cards

escape sequence

a series of characters that represent a special character in a string, allowing for formatting and control sequences, such as '\n' for new lines and '\t' for tabs in Python.

26
New cards

whitespace

any character or sequence of characters that represent horizontal or vertical space in text, such as spaces, tabs, and new lines, which can impact the formatting of strings in Python.

27
New cards

type

a classification that defines the nature of data in Python, determining how it can be used, such as integers, strings, lists, and more.

28
New cards

input()

a built-in function in Python that receives input from the user as a string, allowing for interactive user communication during program execution.

29
New cards

syntax error

an error that occurs when the code does not conform to the rules of Python's syntax, preventing the program from executing properly.

30
New cards

logic error

a mistake in a program that produces incorrect or unexpected results due to flaws in the program's logic, rather than a syntax issue. a common type of error that does not stop program execution but leads to incorrect outcomes, often making it harder to identify and fix.

31
New cards

ValueError


An invalid value is used, which can occur if giving letters to int().

32
New cards

TypeError

An operation uses incorrect types, which can occur if adding an integer to a string.

33
New cards

NameError

the program tries to use a variable that does not exist.

34
New cards

IndentionError

Occurs when the indentation of code blocks in Python is inconsistent or incorrect, leading to a syntax issue.