CAN ANYONE HELP WITH A MATH EQUATION AND JAVA SCRIPT?

Question by Dana:
Can anyone help with a math equation and Java script?
I’m taking a personal class and our group has been given this problem:
The discussion assignment assumes that we have an earth that is a perfectly round and smooth sphere with a rope going around it at the equator such that it fits very snugly. Your group is to define a JavaScript web site that will prompt for a height of a wall in terms of feet. The program then should compute how many feet must be added to the rope so that if a wall of that height were constructed around the equator, the rope will then snugly fit on top of the wall.
Our group has pondered for days and we cannot even come up with the math equation let alone writing a java script code for it.
Please help with the math and Java!
——————————————
Answer by spoxox
Here’s all the Java you need:
Now, as for the javascript that you need, that is different. Try the homework yourself first if you want to have any hope of passing the course.
Mathwise: Picture concentric circles. The inner circle is the original earth. The outer circle is the earth plus fence. The difference in RADIUS is the height of the fence. Clue ends here.
good luck!
——————————————
Know better? Leave your own answer in the comments!









about 2 years ago
As long at the tabs are properly marked and link to legitimate pages or drop downs you shouldn’t have a problem. It doesn’t sound like you are trying to be deceptive or ‘cloak’ your content in any way.
I’d be glad to review the site if you send along a link.
For more free digital marketing advice, visit http://www.allwebprofit.com
about 11 months ago
The math equation is easy. “startingRadius” means that you need to find the current radius of Earth (possibly the teacher provided this?). “newRadius” is just the actual radius of Earth plus the height of the wall: startingRadius=radiusOfEarth, newRadius=radiusOfEarth + userInput;
Now, use the equation for the circumference of a circle, C=2(pi)(radius), but use “newRadius” as the radius.
about 11 months ago
While you could mathematically work this out using the radius of the earth it isn’t a requirement. Simplified, the equation that will give you the difference in circumference – IE the extra rope required is:
(wall height) * 2 * pi
As for the javascript it is straight forward, I don’t have an aversion to helping you out since reverse engineering a problem is often the best way to learn from it. As long as you do understand this script before handing it in.