<reponame>inshaal/CBSE_NCERT_SOLUTIONS<filename>Chapter 1/Ch1_Q16_complex.py<gh_stars>0
#To find sum of complex no.
print "Enter complex no. in which 'a' is real part and 'b' is imaginary part"
a=input("Enter a (real part) : ")
b=input("Enter b (imaginary part without 'i') : ")
print "Complex no. 1 is = ",a,"+",b,"i"
print "Enter another imaginary no. in same way. "
x=input("Enter 'a' (real part) for another complex no. : ")
y=input("Enter 'b' (imaginary part without 'i') : ")
print "Complex no. 2 is =",x,"+",y,"i"
s1=a+x
s2=b+y
print "sum is ",s1,"+",s2,"i"

1/Ch1_Q16_complex.py<gh_stars>0
#To find sum of complex no.
print "Enter complex no. in which 'a' is real part and 'b' is imaginary part"
a=input("Enter a (real part) : ")
b=input("Enter b (imaginary part without 'i') : ")
print "Complex no. 1 is = ",a,"+",b,"i"
print "Enter another imaginary no. in same way. "
x=input("Enter 'a' (real part) for another complex no. : ")
y=input("Enter 'b' (imaginary part without 'i') : ")
print "Complex no. 2 is =",x,"+",y,"i"
s1=a+x
s2=b+y
print "sum is ",s1,"+",s2,"i"
#To find sum of complex no.