"पाइथन प्रोग्रामिंग/वेरिएबल": अवतरणों में अंतर

छो HotCat द्वारा श्रेणी:पाइथन जोड़ी
No edit summary
पंक्ति 4:
== उद्देश्य और कौशल ==
इस पाठ के लिए शामिल उद्देश्य और कौशल निम्न हैं:
 
 
=== डेटा प्रकार ===
Built-in Python data types include integer (int), floating point (float), string (str), and Boolean (bool) data types.<ref>[https://docs.python.org/3/library/stdtypes.html Python.org Built-in Types]</ref>
 
<source lang="Python">
value = 1 + 1
print(value) # Displays 2
print(type(value)) # Displays <type 'int'>
 
value = 0.1 + 0.1
print(value) # Displays 0.2
print(type(value)) # Displays <type 'float'>
 
value = '1' + '1'
print(value) # Displays 11
print(type(value)) # Displays <type 'str'>
 
value = True
print(value) # Displays True
print(type(value)) # Displays <type 'bool'>
</source>
 
[[श्रेणी:पाइथन]]