1.4 - Creating and Using Variables
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 color and assign it the value 'Red'. What is the type of this variable?
💡 Hint: Remember to check using `type()` function.
Create an integer variable year and assign it the value 2021.
💡 Hint: Use a number without quotes.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What is the syntax to create a variable in Python?
💡 Hint: Think about the direction of the assignment.
True or False: A variable name can start with a number.
💡 Hint: Recall the naming rules we discussed.
2 more questions available
Challenge Problems
Push your limits with advanced challenges
Write a Python program that accepts user input for their name and age, and then uses string interpolation to print out a greeting that includes both.
💡 Hint: Use proper variable assignment and print formatting.
Create a program that takes a numeric string input, converts it to an int, adds 10, and prints the result.
💡 Hint: Remember to first convert the string and then perform the addition.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.