Integer Data Types in Python
a=5
print(a, "is of type", type(a))
a=2.0
print(a, "is of type", type(a))
a=1+2J
print(a, "is complex number?", isinstance(1+2j,complex))
Output :
5 is of type <class 'int'>
2.0 is of type <class 'float'>
(1+2j) is complex number? True



0 comments:
Post a Comment
gurnoorsingh5974@gmail.com