1.8 - Try It Yourself
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
Declare a variable 'fruit' and assign it the value 'Mango'. What will be the output of print(fruit)?
💡 Hint: Just use the variable name you assigned.
Create an integer variable 'quantity' and a float variable 'price'. Assign them values and print them. What types do you expect?
💡 Hint: Remember what you learned about data types.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What is the result of type('Hello')?
💡 Hint: Think about what type of data 'Hello' represents.
True or False: Variables can start with a number.
💡 Hint: Recall the rules we discussed about naming variables.
2 more questions available
Challenge Problems
Push your limits with advanced challenges
Design a small program that calculates the area of a rectangle. The user inputs the length and width as floats. Store them in variables. Convert them as necessary to perform calculations, and then print the area.
💡 Hint: Remember to ask for input and convert to float before calculating.
Create a variable to represent your age as a string, convert it to an int, and determine what year you were born in if the current year is 2023.
💡 Hint: Think about how to extract the year from the current year minus your age.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.