1/19
Flashcards for Python Test Prep
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
A _ is a name that stores a value.
A name that stores a value, like a box holding data.
Common Python _ include int, float, str, bool, list, and dict.
int, float, str, bool, list, dict
_ takes data from the user.
Takes data from the user.
_ displays data to the user.
Displays data to the user.
_ are symbols that do math or compare values.
Symbols that do math or compare values.
Common Python _ include +, -, *, /, %, =, ==, !=, >, <.
+, -, *, /, %, =, ==, !=, >, <
_ let the program make decisions based on conditions.
Let the program make decisions based on conditions.
_ repeat a block of code until a condition is met.
Repeat a block of code until a condition is met.
The '_' statement exits a loop.
Exits loop.
The '_' statement skips to the next iteration.
Skips to the next iteration.
A _ is a collection of values stored in a specific order.
A collection of values stored in a specific order.
The _ list method adds x to the end.
Adds x to the end of a list.
The _ list method removes the first x.
Removes the first x from a list.
A _ stores data as key-value pairs.
A structure that stores data as key-value pairs.
A _ is a block of code that runs only when you call it.
A block of code that runs only when you call it.
In the function def greet(name): return _ , the function returns a greeting.
f"Hello {name}"
_ is a Python tool to make user-friendly interfaces for your code.
A Python tool to make user-friendly interfaces for your code.
gr.Interface() _
Makes an app.
_ always gives a string. Convert to number with int() or float()
input() always gives a string. Convert to number with int() or float()
The append() function _
Adds a new item to the end of a list