Search⌘ K
AI Features

Hands On Exercise

Explore Python data types through practical exercises designed to reinforce understanding of variables, string syntax, and usage of float and NoneType. This lesson helps learners apply concepts and identify common errors to improve coding skills.

We'll cover the following...

Congratulations on completing the lesson on Python data types. Test your knowledge through these exercises and get one step closer to mastering Python!

Exercise 1

What would be the type of a variable with the value of 79.3? What would be the type of a variable with the “Best of Luck!” value? 

Exercise 2

Find the error in this declaration of strings and fix it to run the code.

Python
my_string = Hello World

Exercise 3

Complete the following code by adding a float and a NoneType in the list.

Python
my_list = [1, 5, "I'm a string", True]