Write the data type for the following: Which command is used to find the data type of variables? Give one eg. of the command. 1. 78.98 2. "Python" 3. 34 4. -98 5. -97.6 ______________ ______________ ______________ ______________ ______________

Answer :


Final answer:

The 'type()' function in Python is used to find the data type of a variable. The provided examples i.e. 78.98, 'Python', 34, -98, -97.6 represents float, string, integer, integer and float data types respectively.

Explanation:

In Python, the type() command is used to find the data type of a variable. Here, each of the data types for your mentioned examples would be determined as follows:

  1. 78.98 is a float. Example: type(78.98) will output .
  2. "Python" is a string. Example: type("Python") will output .
  3. 34 is an integer. Example: type(34) will output .
  4. -98 is also an integer. Example: type(-98) will return .
  5. -97.6 is a float. Example: type(-97.6) will return .

In conclusion, Python provides the type() function to help determine the data type of any variable easily.

Learn more about Data Types in Python here:

https://brainly.com/question/33232341

#SPJ11

Other Questions