Professional Documents
Culture Documents
1
Aim: Write a python program for
Code:
import sys
S={2+3j}
print("Menu")
print("5.Exit")
c="yes"
while(c=="yes"):
if choice==1:
print("Addition: ",add)
elif choice==2:
print("Conjugate: ",n.conjugate())
elif choice==3:
X=[x.real for x in S]
Y=[x.imag for x in S]
plt.plot(X,Y,"ro")
plt.xlabel("Real axis")
plt.ylabel("Imaginary axis")
plt.show()
elif choice==4:
plot=[x+t for x in S]
print(plot)
plt.scatter(X,Y,label="Star",marker="*",color="green",s=30)
plt.xlabel("Real axis")
plt.ylabel("Imaginary axis")
plt.show()
elif choice==5:
sys.exit()
else:
print("Incorrect input")
Output: