measure = input("What shape do you want? \n1. Box \n2. Sphere \n3. Pyramid \n") if measure == 1: l = input("What is the length: ") h = input("What is the height: ") w = input("What is the width: ") #print ("Box mode has been selected.") #box1 = Box(4, 2000, 2) box1.displayBox() box1.calcVal() box1.calcSur if measure == 2: r = input("What is the radius: ") sphere1 = Sphere(r) sphere1.displaySphere() sphere1.calcVol() sphere1.calcSur() if measure == 3: l = input("What is the length: ") h = input("What is the height: ") w = input("What is the width: ") pyramid1 = Pyramid(l, h, w) pyramid1.displayPyramid() pyramid1.calcVol() pyramid1.calcSur() else: print "Type the numbers 1, 2, or 3 next time"
from Cylinder import Cyl print("Welcome to ShapeTester! \nThis is designed to find the Surface Area and Volume of a few shapes.") print("Enter [1] to enter Box mode. \nEnter [2] to enter Sphere mode. \nEnter [3] to enter Pyramid mode. \nEnter [4] to enter Cylinder mode.") choice = input("Enter choice: ") if choice == 1: print("Box mode has been selected.") box1=Box(input("Enter length: "),input("Enter width: "),input("Enter height: ")) box1.calcVol(box1.boxL,box1.boxW,box1.boxH) box1.calcSA(box1.boxL,box1.boxW,box1.boxH) elif choice == 2: print("Sphere mode has been selected.") sphere1=Sphere(input("Enter radius: ")) sphere1.calcVol(sphere1.sphereR) sphere1.calcSA(sphere1.sphereR) elif choice == 3: print("Pyramid mode has been selected.") pyramid1=Pyramid(input("Enter length: "),input("Enter width: "),input("Enter height: ")) pyramid1.calcVol(pyramid1.pyramidL,pyramid1.pyramidW,pyramid1.pyramidH) pyramid1.calcSA(pyramid1.pyramidL,pyramid1.pyramidW,pyramid1.pyramidH) elif choise == 4: print('Cylinder mode has been selected') cyl1 = Cyl(input('enter radius'),input('enter height')) cyl1.calcVol(cyl1.cylR,cyl1.cylH) cyl1.calcSA(cyl1.cylR,cyl1.cylH) else: