Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What does the assignment statement do?
Think about what happens when you use '='.
Write an assignment statement to assign your favorite color.
Use a string value for your favorite color.
What does the following code do: x = 5?
Think about what '=' represents in programming.
True or False: The assignment statement can only assign integer values.
Consider the types of values you can store in a variable.
Write a Python program that assigns the first name, last name, and age of a user, then prints a greeting message using those variables.
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.
Remember to assign the total to a variable.
5 more questions in this section. Enroll free to practise them all.
Enroll free