Practice Variables and Data Types - 1 | 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

Variables and Data Types

1 - Variables and Data Types

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 fruit and assign it the value 'Mango'. Print its type.

💡 Hint: Use a string in quotes.

Question 2 Easy

Create an integer variable for quantity and print it.

💡 Hint: Numbers without quotes are integers.

4 more questions available

Interactive Quizzes

Quick quizzes to reinforce your learning

Question 1

What is the correct way to declare an integer variable in Python?

int age = 25
age : int = 25
age = 25

💡 Hint: Look for the option that follows the variable assignment syntax.

Question 2

Is the type() function used to determine the data type of a variable?

True
False

💡 Hint: Recall how we use type() in examples.

1 more question available

Challenge Problems

Push your limits with advanced challenges

Challenge 1 Hard

Write a Python script that prompts the user for their name, age, and favorite temperature. Store these in variables, convert the age into an integer, and print all values along with their types.

💡 Hint: Remember to use input() to collect user data.

Challenge 2 Hard

Create three variables for a car's brand, model year, and is_electric status. Print each variable's value and type. Then, change the brand and is_electric values and print them again.

💡 Hint: Think about how to change the variable values and re-print them.

Get performance evaluation

Reference links

Supplementary resources to enhance your learning experience.