0% found this document useful (0 votes)
19 views1 page

Float

The document discusses the float data type in Python, which allows storing floating point or real number values with decimal places. Examples show assigning float values to variables and printing the values and their type. The float type does not support storing binary, octal, or hexadecimal values.

Uploaded by

sandip wankhede
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

Float

The document discusses the float data type in Python, which allows storing floating point or real number values with decimal places. Examples show assigning float values to variables and printing the values and their type. The float type does not support storing binary, octal, or hexadecimal values.

Uploaded by

sandip wankhede
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

============================================

float
============================================
=>'float' is one of the pre-defined class <class, 'float'> and it is treated as
data type
=>The purpose of float data type is that to store Floating Point values / Real
Constant Values (Values with decimal places)
=>Example:- sal , percentage of marks ,
=>This data type allows us to store the floating point data in the form of
Scientific Notation
=>float data type does not provide support for storing binary, octal and Hexa
Decimal number system data from programmer side.

Example:
----------------
>>> a=12.34
>>> print(a)---------------12.34
>>> type(a)---------------<class 'float'>
>>> b=0.99
>>> print(b)------------0.99
>>> type(b)-----------<class 'float'>
>>> a=0b1111.0b1010-------SyntaxError: invalid syntax
>>> a=0o12.0b11111-------SyntaxError: invalid syntax

You might also like