python定义一个复数类complex、内有两个成员变量_1.定义一个复数类Complex,该类有代表实部与虚部的成员变量,有两个构造函数Complex()…

  • Post author:
  • Post category:python


other.acadc16.svg

1.定义一个复数类Complex,该类有代表实部与虚部的成员变量,有两个构造函数Complex()

date.3402d68.svg
2016-08-23

download.d149a6d.svg
0

like.6b1b328.svg
0

collect.2156630.svg
0

暂无评分

classify.8d164f6.svg

其他

points_download.ebc3e32.svg
1

积分下载

question.bf77ac6.svg

如何获取积分?

1.定义一个复数类Complex,该类有代表实部与虚部的成员变量,有两个构造函数Complex()与Complex(int x,int y)分别完成将成员变量初始化为0及给定值,另有计算复数的加减法及输出复数的三个方法,编程序利用该类完成2+3i与6-8i相加,12+9i与20-8i相减,并利用复数的输出方法将结果输出。-Define a complex number class Complex, the class is represented real and imaginary parts of the member variable, there are two constructor Complex () and the Complex (int x, int y) of the respective member variables will be initialized to 0 and the given value Another calculation of complex addition and subtraction method and output the plural of the three methods, programmed to use the class to complete 2+3 i and 6-8i sum, 12+9 i and subtract 20-8i, and the use of the plural output method results output.



版权声明:本文为weixin_42502957原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。