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.
Practice Questions
Test your understanding with targeted questions
Declare a variable fruit and assign it the value 'Mango'. Print its type.
💡 Hint: Use a string in quotes.
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
What is the correct way to declare an integer variable in Python?
💡 Hint: Look for the option that follows the variable assignment syntax.
Is the type() function used to determine the data type of a variable?
💡 Hint: Recall how we use type() in examples.
1 more question available
Challenge Problems
Push your limits with advanced challenges
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.
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.