Python Complex Datatypes

Python Complex Datatypes 

 

python complex datatypes

A complex number is a number with a real and an imaginary component represented as a+bj where a and b contain integers or floating-point values.


# both values are int type

a = 9 + 8j          

print(a)     

print(type(a))


# one int and one float values

b = 10 + 4.5j       

print(b)      

print(type(b))


# both values are float type

c = 11.2 + 1.2j     

print(c)

print(type(c))

No comments:

Post a Comment

Latest Post

Don’t Sweat It – Chill with Crompton Air Cooler Deals

 ðŸŒž Don’t Sweat It – Chill with Crompton Air Cooler Deals  More Details : https://www.amazon.in/s?k=laptops+under+70000&crid=29QIFPXQYB3...