पाइथन में डाटा टाइप | Python Data Type Explain in Hindi

पाइथन में डाटा टाइप | Python Data Type Explain in Hindi


पाइथन में डाटा टाइप 

 Python Data Type Explain in Hindi


जैसे हमने पिछली पोस्ट में पढ़ा जहाँ हमने बात की थी कि पाइथन में कॉमेंट्स किस प्रकार लगाये जाते है और उसे पहले हमे वेरिएबल को समझा आज हम बात करेंगे की पाइथन में डाटा टाइप्स क्या होते है?

(Like we read in the previous post where we talked about how comments are put in Python and first we understood the variable, today we will talk about what are the data types in Python?)

पाइथन डाटा टाइप्स (Python Data Types) - 

किसी भी लैंग्वेज में डाटा को रखने के लिए हमे उसे सही तरीके से रखने की आवश्यकता होती है जैसे डाटा में बात करें तो डाटा कई सारी इनफार्मेशन से मिलके बना होता है जिसमे नंबर, अक्षर, या सिंबल हो सकते है हम यदि इन्हें डायरेक्ट मेमोरी में रखा जायेगा तो काफी ज्यादा दिक्कत आयेगी इसलिए हम इसे हम मेमोरी में डाटा को उनके टाइप के आधार पर रख देते है |

(To keep the data in any language, we need to keep it in the right way, like talking in the data, the data is made up of many information, which can be numbers, letters, or symbols, if we have them in direct memory. If kept, there will be a lot of problem, so we keep the data in memory on the basis of their type.)


python data types in hindi notes


 
पाइथन में डाटा को रखने के लिए काफी टाइप्स बताये गये है - 
(There are many types of data to be stored in Python.)

(Intiger Data Type) इन्टिजर डाटा टाइप
(Float Data Type) फ्लोट डाटा टाइप 
(Copmlex Number ) कॉम्लेक्स नंबर
(String) स्ट्रिंग
(List) लिस्ट
(Tuple) टप्पल 
(Dictionary) डिक्शनरी 
(Boolean ) वूलियन 
(Set) सेट 

python data type chart in hindi



इन्ही डाटा टाइप को अलग अलग केटेगरी में भी बाँटा गया है जैसे नुम्बरिक डाटा टाइप में Integer, Float और Complex डाटा टाइप को रखा गया है | और Sequance डाटा टाइप में String, List,Tuple
को शामिल किया जाता है |

(These data types are also divided into different categories like Integer, Float and Complex data types have been kept in numeric data type. And in Sequence data type String, List,Tuple is included.)


Intiger Data Type - इन्टिजर वह नंबर होते है जिसमे पूर्ण संख्या आये पाइथन में इन्टिजर का मान कितना भी बड़ा हो सकता है इसकी कोई सीमा या लिमिट नही है | इन्टिजर नंबर जैसे 

(Integer is the number in which the whole number comes, there is no limit or limit on how big the value of an integer can be in Python. Integer number like)

0
5
10
-7
-1
6580
1540000
-698555

आदि इन्टिजर नंबर के उदाहरण है | 
(etc. are examples of integer numbers.)

पाइथन प्रोग्राम में इसे अलग से दर्शाने की ज़रुरत नही होती है आप डायरेक्ट वेरिएबल में वैल्यू स्टोर कर सकते है वैल्यू यदि इन्टिजर है तो वब इन्टिजर टाइप में अपने आप सेव हो जाएगी जबकि c, c++ लैंग्वेज में हमे यदि वैल्यू  a वेरिएबल में सेव कर करनी है तो पहले हमे a वेरिएबल का डाटा टाइप बताना होता था फिर हम वैल्यू स्टोर करते थे python में a=7 बस  इतना लिखने से वैल्यू स्टोर हो जाती है और डाटा टाइप भी डिफाइन हो जाता है | 

(There is no need to represent it separately in the Python program, you can store the value in a direct variable, if the value is an integer, then it will be automatically saved in the type of web integer, whereas in c, c++ language, if we save the value in a variable, then So first we had to specify the data type of a variable, then we used to store the value in python by writing a=7, the value is stored and the data type is also defined.)


a=8
print(a)
Ouput - 8 

print(5)
output - 5

    
Float Data Type - फ्लोट नंबर उन्हें बोला जाता है जो संख्या अपूर्ण होती है या दशमलब वाली संख्याओ को फ्लोटिंग वैल्यू कहा जाता है | 

(Float numbers are called those numbers which are incomplete or numbers with decimals are called floating values.)

जैसे -

2.9
3.0
12.9
7.9
-5.6
6.988988

b= 4.5
print(b)

Complex Number - कॉम्लेक्स डाटा टाइप में हम रियल नंबर और इमेजनरी नंबर का उपयोग करते है | रियल वर्ल्ड में हमे इस तरह की कैलकुलेशन करनी होती है जिनमे हमे कुछ नंबर का सही मान ज्ञात नही होता है जैसे √-1 का कोई भी उत्तर नही है | तो इसे ही बहुत सारे मान जिनका कोई सटीक उत्तर नही है उन्हें हम इमेजनरी नंबर मान लेते है मैथ में इसे i से दर्शाया जाता है लेकिन पाइथन में इसे j से दर्शया जाता है |
यदि किसी नंबर के बाद हम j लगा दे तो वह इमेजनरी नंबर कहलायेगा | 

(In complex data type, we use real numbers and imaginary numbers. In the real world, we have to do such calculations, in which we do not know the exact value of some number like there is no answer for -1. So many values ​​that do not have an exact answer, we consider them as imaginary numbers, in math it is represented by i but in python it is represented by j.
If we put j after any number, then it will be called imaginary number.)


Z = a+bj

a- Real Number 
b- Imaginary Number 

String - स्ट्रिंग करैक्टर के सेट को कहा जाता है जैसे ram एक स्ट्रिंग है | 

(The set of string characters is called as ram is a string.)

करैक्टर में 
'a'
'r'
'4'
'#'
'%'

आदि सेट है | 

 print("I am a string.")

Output - I am a string.

 type("I am a string.")

Output - class 'str'

 print('I am too.')

Output - I am too.

 type('I am too.')

Output- class 'str'

List - Multiple आइटम्स को एक साथ स्टोर करने के लिए लिस्ट वेरिएबल का उपयोग किया जाता है |  लिस्ट को  square brackets [ ] से दर्शया जाता है | 

(List variables are used to store multiple items at once. The list is indicated by square brackets [ ] .)

listName = ["apple", "banana", "cherry"]

print(listName)

Output - ["apple","Banana","Cherry"]

Tuple - Multiple आइटम्स को एक साथ स्टोर करने के लिए Tuple वेरिएबल का उपयोग किया जाता है |  Tuple को Round brackets ( ) से दर्शाया जाता है | 

(Tuple variable is used to store multiple items together. Tuple is represented by Round Brackets ( ).)

listName = ("apple", "banana", "cherry")

print(listName)

Output - ("apple","Banana","Cherry")

  लिस्ट और टपल में सब सामान ही है अंतर की बात करे तो लिस्ट Mutable होती है और टपल Immutable होती है अर्थात लिस्ट में मेमोरी में रखे  डाटा को परिवर्तित किया जा सकता है जबकि टपल में मेमोरी में रखे डाटा को बदला नही जा सकता है | 

(List and Tuple are all the same. Talking about the difference, List is Mutable and Tuple is Immutable, that is, the data kept in memory in a list can be changed whereas the data kept in memory in a tuple cannot be changed.)

 Dictionary - unorderडाटा Value का कलेक्शन डिक्शनरी में किया जाता है जैसे कोई वेरिएबल कोई मान रखे, इसमे key और value का सेट होता है | जिससे हम इसको और अच्छी तरह से उपयोग कर सकते है | 

(The collection of unorder data values is done in a dictionary, as if a variable holds a value, it has a set of key and value. So that we can use it better.)

पाइथन में डिक्शनरी को curly {} braces से दर्शाया जाता है | 

# empty dictionary
my_dict = {}

# dictionary with integer keys
my_dict = {1: 'apple', 2: 'ball'}

# dictionary with mixed keys
my_dict = {'name': 'John', 1: [2, 4, 3]}

# using dict()
my_dict = dict({1:'apple', 2:'ball'})


Booleans -  कोडिंग में हमे जब किसी कंडीशन का TRUE और FALSE चेक करना हो तब हम उसके आंसर को सेव करने लिए बूल डाटा टाइप में रखते है | जब हम दो value की तुलना करते है तब पाइथन रिटर्न में TRUE और False ही return करता है | 

(In coding, when we have to check TRUE and FALSE of any condition, then we keep its answer in bool data type to save it. When we compare two values, then Python returns TRUE and False only.)

print(12 > 8)
print(120 == 8)
print(12 < 8)

यहाँ आउटपुट में True Flase प्राप्त होगा | 
(Here True False will be received in the output.)

Set - multiple वैल्यू को यदि स्टोर करना हो तब हम सेट का उपयोग करते है इसमे रखे गये डाटा को चेंज नही किया जा सकता है और न ही इंडेक्स किया जा सकता है | 
सेट  Unordered,Unchangeable होते है और साथ ही Duplicates को Allow नही करते है |

(If we want to store multiple values, then we use set, the data kept in it cannot be changed or indexed.
Sets are Unordered, Unchangeable and also do not allow Duplicates.)


अब यहाँ हमने पाइथन में उपयोग होने वाले सारे डाटा टाइप को समझ लिया है अब हम जब भी वेरिएबल क्रिएट करेंगे तब पाइथन उस डाटा को डाटा के अनुसार डाटा टाइप में रख देगा | 

अब नेक्स्ट पोस्ट में हम सिख्नेगे की एक पाइथन में दो या दो से ज्यादा नंबर जोड़ने का प्रोग्राम कैसे बनाये - 


----------------------------------------------------------------


Please Do Not Enter Any Spam Link in The Comments Box

Post a Comment (0)
Previous Post Next Post