def instructions(): print "This Program allows one to calculate the cost of producing an open top cylinder. " def userinput (): d = float( raw_input( "Cylinder the diameter of the base of the cyclinder(cm): " ).strip() ) h = float( raw_input( "Cylinder height (cm): " ).strip() ) p = float( raw_input( "Price per (cm^2): ").strip() ) a = float( raw_input( "Number of units: ").strip() ) return d, h, p, a def surfacearea(r, h): import math SA = (math.pi * r * r ) + (2 * math.pi * r * h ) return SA def output(): unitpice = SA * p order = unitprice * a instructions() d, h, p, a = userinput() r = d / 2 surfacearea (r,h) output()