# F L O A T I N G BA R G E # Frans Coenen # University of Liverpool # 8 March 2013, updated 1 October 2016 # Constants (weight of iron (KG per square meter) # By convention names for constants are written in uper case WEIGHT_OF_IRON = 7.780; WEIGHT_OF_WATER = 1.000; THICKNESS_OF_IRON = 0.010; # Input print('Input Length, Breadth and Height of iron barge') length = float(input('Length:\t')) breadth = float(input('Bredth:\t')) height = float(input('Height:\t')) # Determine volume of the iron used to build the barge, # Remember that the barge has no top. totalVolume= length*breadth*height internalVolume = (length-(THICKNESS_OF_IRON*2))*(breadth-(THICKNESS_OF_IRON*2)) * \ (height-THICKNESS_OF_IRON) volume = totalVolume-internalVolume # Determine mass of barge mass = volume*WEIGHT_OF_IRON # Determine draft draft = mass/(length*breadth*WEIGHT_OF_WATER) # Output print("Draft = \t",draft);