In Python...
Instructions:
With exactly 2500 cm2 of cardboard, we wish to construct a box (width x, depth y, height z that can contain a volume V).
We require the depth to be half the height.
We would like to maximize the volume the box can hold.
Use SciPy.Optimize to find out which values of x, y, z fulfills our objective.
Run your code so the Jupyter notebook is showing the solution
`Hey,
Note: If you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
import scipy.optimize
f = lambda z: -0.5*((2500-z*z)/(3*z))*z*z
zopt = scipy.optimize.fmin(func=f, x0=[1]);
xopt=((2500-zopt*zopt)/(3*zopt));
yopt=0.5*zopt;
print("x=",xopt);
print("y=",yopt);
print("z=",zopt);
Kindly revert for any queries
Thanks.
In Python... Instructions: With exactly 2500 cm2 of cardboard, we wish to construct a box (width...
A box with a square base and open top must have a volume of 2048 c m 3 . We wish to find the dimensions of the box that minimize the amount of material used. The length of the base is x and the height is h. Since the base is a square, the surface area of just the base would be: Area = The surface area of just one side would be: Area = The surface area of all...
Python 2.7.14 Programming Assignment Shape Drawing With
Notepad++(PLEASE READ AND FOLLOW THESE INSTRUCTIONS THOROUGLY AS
THIS ASSIGNMENT IS FOR PYTHON 2.7.14. ONLY AND I REALLY NEED THIS
TO WORK!!! ALSO PLEASE HAVE THE CODE PROPERLY INDENTED, WITH
WHATEVER VARIABLES DEFINED, WHATEVER IT TAKES TO WORK FOR PYTHON
2.7.14. I feel like nothing I do is working and I'm trying
everything I can think of. ):
In this assignment, the student will create a Python script that
implements a series of...