Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
Define a variable called favorite_color and set it to your favorite color.
Think of your favorite color and represent it in quotes.
Create an integer variable called number_of_pets.
Use whole numbers only.
What type of data is used to represent text in Python?
It's the type you use for names or descriptions.
True or False: A variable can only hold one specific value throughout the program.
Think about how variables work in math.
Define a program that accepts user input for their name, age, height, and student status, storing each in appropriate variables, then outputs a sentence summarizing the input.
Remember to convert types as necessary.
Create a function that takes two numbers as parameters and returns their sum. Use variables to store the numbers passed to the function.
Use return statement to output the result.
5 more questions in this section. Enroll free to practise them all.
Enroll free