H
HopQuiz.
Python Basics
17 cards · by HopQuiz · free flashcards with spaced repetition
Study this deck in HopQuiz →
Cards in this deck
- Print text to the screen — print()
- Symbol for a single-line comment — #
- Define a function — def
- Loop a set number of times — for loop
- Loop while a condition is true — while loop
- Test for equality — ==
- Data type for whole numbers — int
- Data type for text — str (string)
- Data type for True/False — bool
- Data type for decimals — float
- Get the length of a list or string — len()
- Convert a value to an integer — int()
- Add an item to the end of a list — .append()
- A key–value data structure — dictionary (dict)
- An immutable ordered collection — tuple
- Conditional keyword — if
- "Otherwise" keyword — else
Open HopQuiz to study Python Basics with flip, multiple-choice, and type-the-answer modes, spaced repetition, and a focus timer.
Launch HopQuiz →