Important Notice:

Numeric Data Types

Numeric Data Types

2 views 1 min read

Numeric Data Types (संख्यात्मक डेटा टाइप) :-

Numeric Data Types (संख्यात्मक डेटा टाइप) का उपयोग Python में विभिन्न प्रकार की संख्याओं (Numbers) को संग्रहित (Store) करने तथा उन पर गणनाएँ (Calculations) करने के लिए किया जाता है।

Python में Numeric Data Types Immutable (अपरिवर्तनीय) होते हैं। अर्थात् एक बार Object बनने के बाद उसकी Value बदली नहीं जा सकती। यदि Value बदलते हैं, तो Python एक नया Object बना देता है।

English

Numeric Data Types are used in Python to store different kinds of numbers and perform mathematical calculations.

Numeric data types in Python are Immutable, which means once an object is created, its value cannot be changed. If the value changes, Python creates a new object.

Immutable Example:-

a = 10
print(a)
print(id(a))
a = 20
print(a)
print(id(a))
 
Output-
10
140733320123456
20
140733320123888

Types of Numeric Data Types -

Python में Numeric Data Types तीन प्रकार के होते हैं।

  1.  Integer (int)
  2.  Float (float)
  3.  Complex Number (complex)

 

Related Notes