赞
踩
class rectangle: def area(long,width): long = long width = width print("该矩形的面积为:{}".format(long*width)) class cl(rectangle): def cuboid(long,width,height): print("该长方体的体积为:{}".format(long * width*height)) class test: print("请输入长方体的长:") long = int(input()) print("请输入长方体的宽:") width = int(input()) print("请输入长方体的高:") height = int(input()) rectangle.area(long,width) cl.cuboid(long,width,height) test()
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。