Different Data Types in Python- Int, Float, String, Boolean | Lecture 4 | Python Tutorial in English

Опубликовано: 21 Февраль 2025
на канале: Code House
428
10

This Python Tutorial by Mayank Gupta, you will learn about Basic Introduction of Data Type, Use of type() function, int, float, string, Boolean and at last Test Your Skills.

Today's Subtopics :
1. Basic Introduction of Data Type.
2. Use of type() function
3. Int
4. Float
5. String
6. Boolean
7. Test your skills

1. Basic Introduction of Data Type :
A data type is a classification of the type of data that a variable or object can hold in computer programming.
Like integer, float, string etc.

2. Use of type() function :
type() is used to get the data type of any variable.

3. Integer :
An integer (int) is a variable that specifically holds a numerical value.
Ex - 732, 63, etc.

4. Float :
Float is a term is used to define a variable with a fractional value or a decimal value.
Ex : 10.5, 3.14, 22/7, 16/5.

5. String :
A string (str) is a variable that can hold a range
of characters (including numbers).
Strings are usually enclosed in inverted commas like : "This is a string".

6. Boolean :
Boolean values are the two constant objects False
and True. They are used to represent truth values.
In numeric contexts, they behave like the integers 0
for False and 1 for True, respectively.
The bool() function can be used to cast any value to a Boolean.

7. Test your Skills :
a = 10
b = "10"
c = 0
d = "0"
e = “”
print(bool(a))
print(bool(b))
print(bool(c))
print(bool(d))
print(bool(e))

This is the fourth lecture of the Python series of 13 Videos.
Please Like, Comment, Share and Subscribe to my Channel.
My profile : https://www.xsonic.in/profile/

Thank You
Mayank Gupta