Prompt the user for their weight in pounds on earth

Assignment Help Computer Engineering
Reference no: EM132218415

Question :

Write a script named MoonWeight.m that prompts the user for their weight in pounds on Earth and then displays their mass and how much they would weigh on the moon.

Use appropriately-named variables to represent masses, to represent the radius of the Moon, and for conversion factors.

Constants should be all-caps, e.g. MASS_OF_MOON  Assume 1 pound mass (lbm) = 0.454 kilograms.

Assume 1 pound mass exerts 1 pound force (lbf) of force at your location on Earth.

Use your script compute_gravitational_force to compute the gravitational forces.

Test case: Someone who weighs 132 lbf on Earth would weigh 21.86 lbf on the Moon, which has a mass of 7.34767309e22 kg and a radius of 1737400 m.

Output should be formatted to look like Your mass is 59.93 kg. You would weigh 21.86 lbs on the Moon.

Your script must be commented, including the header and help comments.

Reference no: EM132218415

Questions Cloud

Develop an international marketing plan : The assignment involves the development of an international marketing plan, which would help a firm exploit the market opportunity to sell products.
Write a do-while loop that continues to prompt a user : Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less than 100.
Write response on prizm cluster and vals type : When I was a teenager, I lived in a suburban area just 20 minutes away from Center City, Philadelphia. The clusters that were listed were as follows.
Write the line that declare and creates a 2-d array of chars : Write the line that declare and creates a two-dimensional array of chars, tictactoe, with 3 rows, each with 3 elements , and initialize it to all space.
Prompt the user for their weight in pounds on earth : Prompt the user for their weight in pounds on Earth and then displays their mass and how much they would weigh on the moon.
Have the widest variety of interests and activities : I think I have a nice blend of attributes from both the primary and secondary VALS segment profiles. I placed asterisk next to the ones.
What is the latest version of html : What is a computer that manages shared resources for access across a network called?
Write an introduction and a mission statement for company : Need an introduction and a mission statement for this company I am opening up. A brief description of the company is attached (document labeled cafe by day bar)
Write a function that accepts a string : Write a function named word_count that accepts a string as its parameter and returns the number of words in the string.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Determine the optimal leasing schedule cost

Construct a graph showing how the optimal total cost varies with the cost of a 5-month lease, over the range from $800 to $1000.

  Transforming infix to reverse polish

Transform the following formulas from infix to the reverse Polish: A + B + C + D - E, (A - B) x (C +D) + E

  Write a program to display any specified cubic curve

Write a program to display any specified cubic curve using forward differences to calculate points along the curve path.

  Write a threaded echo client using sockets in c

Your problem is to add a "nice" feature to this program to allow a user to start a command-line shell on the host machine.

  Question1 write down an application named coins that asks

question1. write down an application named coins that asks user to enter one integer representing a monetary value in

  Select an open-source development effort

Select an open-source development effort (other than Linux), and present a brief history of its evolution and relative success.

  Write a program that will display the first name

You are on the Welcoming Committee at "Geeks -R- Us", you are tasked with building a basic information data sheet on the new potential employees.

  Benefits and negative effects by workplace automation

State at least three advantages and three negative effects brought about by the workplace automation. A multinational corporation transfers a foreign employee to United States on an L-1 visa. The foreign employee is a computer programmer, working ..

  Write a recursive function to reverse a string

Write a recursive function to reverse a string. Write a recursive to reverse the words in a string i.e., "cat is running" becomes "running is cat".

  Describe the steps necessary to configuring validation

Describe the steps necessary to configuring validation and revocation so that the validation requests are handled efficiently.

  Create a driver class called rollingdice-two

Using the Die class defined in this chapter, write a class called PairOfDice, composed of two Die objects. Include methods to set and get the individual die.

  Write a program that takes as input a fully parenthesized

Write a program that takes as input a fully parenthesized, arithmetic expression and converts it to a binary expression tree.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd