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

How to Generate Barcode and QR code For Our Products

 మీ products కి barcode / QR code generate చేయాలంటే OPTION 1: ONLINE (No Coding – Quick) Best for small shops / beginners 👉Free websites: T...