Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
Declare a variable fruit and assign it the value 'Mango'. Print its type.
Use a string in quotes.
Create an integer variable for quantity and print it.
Numbers without quotes are integers.
What is the correct way to declare an integer variable in Python?
Look for the option that follows the variable assignment syntax.
Is the type() function used to determine the data type of a variable?
Recall how we use type() in examples.
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.
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.
Think about how to change the variable values and re-print them.
5 more questions in this section. Enroll free to practise them all.
Enroll free