1.2 - What is a Variable?
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
Declare a variable named pet and assign it your favorite animal.
💡 Hint: Think about your favorite animal.
Create an integer variable num with the value 10.
💡 Hint: Use a whole number.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What is the purpose of a variable?
💡 Hint: Think about how we define them!
True or False: Python variable names must start with a number.
💡 Hint: Recall the rules for naming variables.
2 more questions available
Challenge Problems
Push your limits with advanced challenges
Create a mini program that collects your favorite dish, its price, and if it's spicy, then prints this information with types.
💡 Hint: Make sure to define the appropriate types for each variable.
Using a variable named balance, start with an integer value, convert it to a float and print the type before and after.
💡 Hint: Don’t forget to print the type at each step!
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.