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.
Declare a variable color and assign it the value 'Red'. What is the type of this variable?
Remember to check using `type()` function.
Create an integer variable year and assign it the value 2021.
Use a number without quotes.
What is the syntax to create a variable in Python?
Think about the direction of the assignment.
True or False: A variable name can start with a number.
Recall the naming rules we discussed.
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.
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.
Remember to first convert the string and then perform the addition.
6 more questions in this section. Enroll free to practise them all.
Enroll free