Practice What is a Variable? - 1.2 | Variables and Data Types | Python Programming Language
Students

Academic Programs

AI-powered learning for grades 8-12, aligned with major curricula

Professional

Professional Courses

Industry-relevant training in Business, Technology, and Design

Games

Interactive Games

Fun games to boost memory, math, typing, and English skills

What is a Variable?

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.

Learning

Practice Questions

Test your understanding with targeted questions

Question 1 Easy

Declare a variable named pet and assign it your favorite animal.

💡 Hint: Think about your favorite animal.

Question 2 Easy

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

Question 1

What is the purpose of a variable?

To store data
To delete data
To retrieve hardware
None of the above

💡 Hint: Think about how we define them!

Question 2

True or False: Python variable names must start with a number.

True
False

💡 Hint: Recall the rules for naming variables.

2 more questions available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

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.

Challenge 2 Hard

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.