Shashank T S
last year
Shashankcountry asked

What are datatypes?

Abhay Jajodia
Expert
last year
Abhay Jajodia answered

Hi Shashank,

Datatypes tell the computer what kind of value something is, like a number, text, or true/false. This helps the language know what operations make sense.

Common Python datatypes:

  • int for whole numbers like 5

  • float for decimals like 5.6

  • str for text like "hello"

  • bool for True or False

If you have more questions, I am here to help 😊

Python
This question was asked as part of the Getting started with Python course.