Python primitive data type full tutorial | Python Bootcamp

Introduction

Data types: In this post, you will learn the four types of primitive data types, They are strings, integers, float, Boolean etc.,

Below is the video format of the post ????????, Have any doubts do check the video.

Video:

Python primitive data types ❓

There are four different types of data types they are;

  1. Strings
  2. Integers
  3. Float
  4. Boolean

Strings

Any value in between the ” ” or ‘ ‘ are called strings, below is an example of the strings.

eg: print(“Hello world”)

eg: print(“123” + “345”)

Integers

Any number values without a string inside the parenthesis are called integers or int.

eg: print(123+345)

eg: print(5)

Float

Float is the decimal number, which will be something like this ????????????

3.4

eg: print(4.4)

eg: print(3.2 * 4.5)

You can use any operators like BODMAS, but remember any decimal value is called the float.

Boolean

True or False is called boolean data type, you may notice that the letters start with only capital letters like True or False


Also Read: Variables in python full tutorial

Also Read: Swapping two variables in python