Question: Write a script that will calculate a persons weight on each planet of the solar system, the sun, and the moon. You should create an

Write a script that will calculate a person’s weight on each planet of the solar system, the sun, and the moon. You should create an html form with text boxes for each planet (also the sun and moon). You should also have a text box for a person to enter their weight on Earth. When the user clicks on a button, a javascript function should be called that calculates each weight and puts the results in the corresponding text boxes in the form. Use the Math.round method to round the numbers to the nearest whole number. Here are some formulas for the conversions.

Mercury = weight * .378

Venus = weight * .907

Mars = weight * .377

Jupiter = weight * 2.364

Saturn = weight * .916

Uranus = weight * .889

Neptune = weight * 1.125

Pluto = weight * .067

Sun = weight * 27.072

Moon = weight * .166

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Certainly Lets break down the task of creating an HTML form with a JavaScript function to calculate and display a persons weight across different cele... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (2 attachments)

PDF file Icon

60960e90ab018_26552.pdf

180 KBs PDF File

Word file Icon

60960e90ab018_26552.docx

120 KBs Word File

Students Have Also Explored These Related Algorithms Questions!