from Sphere import Sphere from Cuboid import Cuboid spRadius = float(input()) spColor = str(input()) cuLength = float(input()) cuWidth = float(input()) cuHeight = float(input()) cuColor = str(input()) sp = Sphere(spRadius, spColor) cu = Cuboid(cuLength, cuWidth, cuHeight, cuColor) print( str(sp) + ":(%d),%.1f,%s" % (sp.getRadius(), sp.getVolume(), sp.getColor())) print( str(cu) + ":(%d,%d,%d),%.1f,%s" % (cu.getLength(), cu.getWidth(), cu.getHeight(), cu.getVolume(), cu.getColor()))
from Shape import Shape from Cuboid import Cuboid from Sphere import Sphere #main inp = [] for i in range(6): inp.append(input()) sphere = Sphere(int(inp[0]), inp[1]) cubiod = Cuboid(int(inp[2]), int(inp[3]), int(inp[4]), inp[5]) print("{}:({}),{},{}".format(str(sphere), sphere.getRadius(), sphere.getVolume(), sphere.getColor())) print("{}:({},{},{}),{},{}".format(str(cubiod), cubiod.getLength(), cubiod.getWidth(), cubiod.getHeight(), cubiod.getVolume(), cubiod.getColor()))
from Sphere import Sphere from Cuboid import Cuboid radius = int(input()) scolor = str(input()) l = float(input()) w = float(input()) h = float(input()) ccolor = str(input()) sphere = Sphere(radius) sphere.setColor(scolor) cuboid = Cuboid(l, w, h) cuboid.setColor(ccolor) print("{}({}),{},{}".format(sphere.__str__(), sphere.getRadius(), round(sphere.getVolume(), 1), sphere.getColor())) print("{}({},{},{}),{},{}".format(cuboid.__str__(), int(cuboid.getLength()), int(cuboid.getWidth()), int(cuboid.getHeight()), round(cuboid.getVolume(), 1), cuboid.getColor()))
from Cuboid import Cuboid from Sphere import Sphere radius = int(input()) c1 = input() length = float(input()) width = float(input()) height = float(input()) c2 = input() sphere = Sphere(radius, c1) cuboid = Cuboid(length, width, height, c2) print("{}({}),{},{}".format(sphere.__str__(), sphere.getRadius(), sphere.getVolume(), sphere.getColor())) print("{}({},{},{}),{},{}".format(cuboid.__str__(), int(cuboid.getLength()), int(cuboid.getWidth()), int(cuboid.getHeight()), cuboid.getVolume(), cuboid.getColor()))