Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is a variable in Python?
Think about how you might label a box to know what's inside.
Name a data type that can hold true or false.
Consider the two possible truth values.
What does Python use to denote a single-line comment?
Look for the symbol often used for short explanations in the code.
True or False: Variables in Python must be declared with a specific data type.
Think about how flexible Python is with variable types.
Write a Python program that defines three different variables: a string, an integer, and a boolean. Print each variable and its type.
Remember to use type() to check the types of your variables.
Create a multi-line comment in your Python script that describes the purpose of your script and the data types you are using.
What do you want future readers to know about your code?
6 more questions in this section. Enroll free to practise them all.
Enroll free