again = "y" while str.lower(again)=="y": answer = input("Do you want to calculate the volume of a cuboid or cylinder? ") realPi = float(3.14159) def cylindervol(radius,length): realVolume = realPi*realRadius*realLength print('The volume of the cylinder is ') print(realVolume) def cuboidvol(): realVolume = realHeight*realWidth*realLength print("The volume of the cuboid is ") print(realVolume) if str.lower(answer)=="cylinder": realRadius=float(input('Enter the radius of the cylinder : ')) realLength=float(input('Enter the length of the cylinder : ')) cylindervol(realRadius,realLength) again = input('Do you want to calculate another?(y or n)') if str.lower(answer)=="cuboid": realWidth=float(input('Enter the width of the cuboid : ')) realLength=float(input('Enter the length of the cuboid : ')) realHeight=float(input('Enter the height of the cuboid : ')) cuboidvol() again = input('Do you want to calculate another?(y or n)')