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

13

Uploaded by

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

13

Uploaded by

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

3

1. a = 5
2. print("The type of a", type(a))
3.
4. b = 40.5
5. print("The type of b", type(b))
6.
7. c = 1+3j
8. print("The type of c", type(c))
9. print(" c is a complex number", isinstance(1+3j,complex))
Output:
The type of a <class 'int'>
The type of b <class 'float'>
The type of c <class 'complex'>
c is complex number: True
Python supports three kinds of numerical data.
o Int: Whole number worth can be any length, like numbers
10, 2, 29, - 20, - 150, and so on. An integer can be any length
you want in Python. Its worth has a place with int.
o Float: Float stores drifting point numbers like 1.9, 9.902,
15.2, etc. It can be accurate to within 15 decimal places.
o Complex: An intricate number contains an arranged pair,
i.e., x + iy, where x and y signify the genuine and non-
existent parts separately. The complex numbers like 2.14j,
2.0 + 2.3j, etc.

Sequence Type
String

You might also like