测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A37283. 有如下程序段:class xcal: def __init__(self, numx, numy) : self. numx=numx self. numy=numy def xadd(self, another) : numx=self. numx*another. numx numy=self. numy*another. numy return xcal(numx, numy) def p…

单选题 困难

题目描述

有如下程序段:

class xcal:

        def __init__(self, numx, numy) :

                self. numx=numx

                self. numy=numy

        def xadd(self, another) :

                numx=self. numx*another. numx

                numy=self. numy*another. numy

                return xcal(numx, numy)

        def print(self) :

                print(str(self. numx) +"/"+str(self. numy) )

x=xcal(2, 3)

y=x. xadd(xcal(4, 5) )

y. print()

程序运行后, 输出的结果是? (    )


选项(单选)

上一题 下一题