The code below defines various variables, determines and prints out the data type of each variable. Fill in the blanks for the code to work correctly. Keep in mind that you need a function, not a string with the name of the data type.
Data type identification and printing
Report a typo
Fill in the gaps with the relevant elements
# Define a variable with a string value
data = "Hello, world!"
data_type = (data)
print("The data is a", data_type)
# Define a variable with an integer value
data = 42
data_type = (data)
print("The data is an", data_type)
# Define a variable with a float value
data = 3.14
data_type = (data)
print("The data is a", data_type) ___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.