1.2 - Assignment Statement
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
What does the assignment statement do?
💡 Hint: Think about what happens when you use '='.
Write an assignment statement to assign your favorite color.
💡 Hint: Use a string value for your favorite color.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What does the following code do: x = 5?
💡 Hint: Think about what '=' represents in programming.
True or False: The assignment statement can only assign integer values.
💡 Hint: Consider the types of values you can store in a variable.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Write a Python program that assigns the first name, last name, and age of a user, then prints a greeting message using those variables.
💡 Hint: Use an f-string to format the greeting.
Create an assignment statement that calculates the total cost of 3 items costing 4.50, 2.50, and 5.00 in one line.
💡 Hint: Remember to assign the total to a variable.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.