Day 2 of #30DaysOfCode : type() function

Day 2 of #30DaysOfCode : type() function

Question:

In the GitHub repository, Infinity-AI(Infinite Learn and Grow)/30-Days-code inside the Day-2 folder create the name.py file as defined in the readme.md file.

  • Declare a first name variable, last name variable, country variable, city variable, age variable, and DOB variable and declare a variable is_true. You can declare multiple variables in one line. Check the data type of all your variables using the type() built-in function.

Solution:

First we declare variables and check their data types using type() function.

Lets declare variables first:

After declaring all the variables we check the data types by using python inbuilt function type().

Below code will print their data types in the output section using print() function.

Thank you :)