Skip to content

aysh-mzmdr/Complex_Number

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Complex_Number

A python module that allows the use of complex numbers and their properties in the program

How to use this module in your program

Keep the complexNo.py file in the same directory as the program which needs the implemetation of complex numbers. Now write the following code :

from complexNo import ComplexNo

Now you are ready to use complex numbers in your program

Functions

  1. c1=ComplexNo(a,b) : Creates a complex number c1 with a as the real part and b as the imaginary part
  2. c3=c1+c2       : Adds two complex numbers c1 and c2 and stores it in c3, a complex number
  3. c3=c1-c2        : Subracts a complex number c2 from c1 and stores it in c3, a complex number
  4. c3=c1*c2        : Multiplies two complex numbers c1 and c2 and stores it in c3, a complex number
  5. c3=c1/c2        : Divides two complex numbers c1 and c2 and stores it in c3, a complex number
  6. c3=c1//c2      : Divides two complex numbers c1 and c2 , floors it and stores it in c3, a complex number
  7. c3=c1.arg()     : Returns the argument of a complex number c1 and stores it in c3, a float value
  8. c3=c1.mod()     : Returns the modulus of a complex number c1 and stores it in c3, a float value
  9. c3=c1.conj()     : Returns the conjugate of a complex number c1 and stores it in c3, a complex number
  10. c3=c1.sqrt()      : Returns the square root of a complex number c1 and stores it in c3, a complex number
  11. c3=c1**n       : Returns the exponential of a complex number c1 to the power n and stores it in c3,          a complex number
  12. print(c1)         : Displays the a complex number c1

About

A python module that allows the use of complex numbers and their properties in the program

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages