Question

I need Notebook++ coding! Thanks so much I will upvote! <!DOCTYPE html> <html> <body> <!-- replace...

I need Notebook++ coding! Thanks so much I will upvote!

<!DOCTYPE html>
<html>
<body>
<!-- replace the text below with your name!-->
   <!-- -->
   <!-- -->
   <title> Jason Kidwell</title>
<script>
//
// Scientists measure an object’s mass in kilograms and its weight in newtons.
// If you know the amount of mass of an object in kilograms, you can calculate
// its weight in newtons with the following formula:
//
//       weight=mass×9.8
//
// Write a program that asks the user to enter an object’s mass, then calls a
// function to calculate the object's weigh in newtown. If the object weighs
// more than 500 newtons, display a message indicating that it is too heavy.
// If the object weighs less than 100 newtons, display a message indicating
// that it is too light.
//

function calculateWeightInNewtons(mass) ;

/////////////////////////////////////////////////////////////////////////////////
// Insert your code between here and the next comment block. Do not alter //
// any code in any other part of this file. //
/////////////////////////////////////////////////////////////////////////////////

  
/////////////////////////////////////////////////////////////////////////////////
// Insert your code between here and the previous comment block. Do not alter //
// any code in any other part of this file. //
/////////////////////////////////////////////////////////////////////////////////

}

var massInKilograms = parseFloat(prompt("What is the object's mass in kilograms? "));
calculateWeightInNewtons(massInKilograms);

</script>
</body>
</html>



  
  
  

Jason Kidwell


0 0
Add a comment Improve this question Transcribed image text
Answer #1

Below is your code. This will alert the output.

<!DOCTYPE html>
<html>
<body>
<!-- replace the text below with your name!-->
<!-- -->
<!-- -->
<title> Jason Kidwell</title>
<script>
//
// Scientists measure an object’s mass in kilograms and its weight in newtons.
// If you know the amount of mass of an object in kilograms, you can calculate
// its weight in newtons with the following formula:
//
// weight=mass×9.8
//
// Write a program that asks the user to enter an object’s mass, then calls a
// function to calculate the object's weigh in newtown. If the object weighs
// more than 500 newtons, display a message indicating that it is too heavy.
// If the object weighs less than 100 newtons, display a message indicating
// that it is too light.
//

function calculateWeightInNewtons(mass) {

/////////////////////////////////////////////////////////////////////////////////
// Insert your code between here and the next comment block. Do not alter //
// any code in any other part of this file. //
/////////////////////////////////////////////////////////////////////////////////
   var weight = mass * 9.8;
   if(weight > 500) {
       alert("Object is too heavy");
   } else if(weight < 100) {
       alert("Object is too light");
   }
  
/////////////////////////////////////////////////////////////////////////////////
// Insert your code between here and the previous comment block. Do not alter //
// any code in any other part of this file. //
/////////////////////////////////////////////////////////////////////////////////

}

var massInKilograms = parseFloat(prompt("What is the object's mass in kilograms? "));
calculateWeightInNewtons(massInKilograms);

</script>
</body>
</html>

Add a comment
Know the answer?
Add Answer to:
I need Notebook++ coding! Thanks so much I will upvote! <!DOCTYPE html> <html> <body> <!-- replace...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • <!DOCTYPE html> <html> <body> <!-- replace the text below with your name!--> <!-- --> <!-- -->...

    <!DOCTYPE html> <html> <body> <!-- replace the text below with your name!--> <!-- --> <!-- --> <title> TYPE YOUR NAME HERE</title> <script> // // Write a program that asks the user to enter the amount that he or she has // budgeted for a month. Call a function that uses a loop that prompts the user // to enter each of his or her expenses for the month and keep a running total. // The loop finishes when the user...

  • <!DOCTYPE html> <html> <body> <!-- replace the text below with your name!--> <!-- --> <!-- -->...

    <!DOCTYPE html> <html> <body> <!-- replace the text below with your name!--> <!-- --> <!-- --> <title> TYPE YOUR NAME HERE</title> <script> // // Write a program that prompts the user to enter a number within the range of // 1 through 10 and calls a function to display the roman numeral version of // that number. If the number is outside the range of 1 through 10, the program // should display an error message. // // The following...

  • <!DOCTYPE html> <html> <body> <script> // // Write a function that calculates the amount of money...

    <!DOCTYPE html> <html> <body> <script> // // Write a function that calculates the amount of money a person would earn over // a period of years if his or her salary is one penny the first day, two pennies // the second day, and continues to double each day. The program should ask the // user for the number of years and call the function which will return the total // money earned in dollars and cents, not pennies. Assume...

  • Create Visual Basic projects to solve Programming Challenges 14 - Mass and Weight Scientists measure an...

    Create Visual Basic projects to solve Programming Challenges 14 - Mass and Weight Scientists measure an object's mass in kilograms and its weight in newtons. If you know the amount of mass an object, you can calculate its weight, in newtons, with the following formula: Weight=mass*9.8 Create VB application that lets the user enter an object's mass and calculates its weight. If the object weighs more than 1000 newtons, display a message indicating that it is too heavy. If the...

  • Hi Expert I need to make a html checkout page link from product page <!DOCTYPE html>...

    Hi Expert I need to make a html checkout page link from product page <!DOCTYPE html> <html lang="en"> <head>     <link rel="stylesheet" href="bootstrap/css/bootstrap.css">     <link rel="stylesheet" href="style.css">     <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>     <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>     <script src="./bootstrap/js/bootstrap.js"></script>     <meta charset="UTF-8">     <title>Perry Gerry Mobile Cellular</title> </head> <body> <div class="d-flex flex-column flex-md-row align-items-center p-3 px-md-4 bg-white border-bottom shadow-sm">     <h5 class="my-0 mr-md-auto font-weight-normal">Perry Gerry Mobile Cellular</h5>     <nav class="my-2 my-md-0 mr-md-3">         <a class="p-2 text-dark" href="index.html">Home</a>         <a class="p-2 text-dark" href="about.html">About Us</a>         <a class="p-2 text-dark" href="products.html">Products</a>         <a class="p-2 text-dark"...

  • (10pts).   Consider the following: void fun1(void); void fun2(void); void fun3(void); void main() {    Int a,b,c;...

    (10pts).   Consider the following: void fun1(void); void fun2(void); void fun3(void); void main() {    Int a,b,c;    … } void fun1(void){    Int b,c,d;    … } void fun2(void){    Int c,d,e;    … } void fun3(void){    Int d,e,f;    … } Given the following calling sequences and assuming that dynamic scoping is used. What variables are visible during execution of the last function called? Include with each visible variable the name of the function in which it was...

  • I need help with my javascript project, I've started on it but I can't seem to...

    I need help with my javascript project, I've started on it but I can't seem to get ym java scripts to work with my index.html. Can someone please help me fix my code? I need the main.js & scratchpad.js to work with my index.html .Thank you Directions: Go to the following link: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics On that page, scroll down to "A 'hello world' example". Follow the step-by-step instructions to download their code and edit it in your text editor of choice....

  • given below are the project description and their Html and css files i need javascript according...

    given below are the project description and their Html and css files i need javascript according to the project and other files! WEB230 - JavaScript 1 Assignment 6b - Event Delegation Before starting, study the HTML and open it in a browser so that you understand the structure of the document. You will add functionality to perform several tasks in our shopping list app. Clicking the red "X" at the right of an item will delete that item. Clicking on...

  • Develop an HTML form that could be used to enter your book information (Books, Authors, and...

    Develop an HTML form that could be used to enter your book information (Books, Authors, and Publishers) start with the HTML/JavaScript template provided Expand upon it! What field information would you enter into a system? Have your form use more then just character text fields ... radio buttons, pick lists, and other elements make your form easier to use and you don't need to do lots of JavaScript checks. What fields would be mandatory ... which could be left blank?...

  • The following are screen grabs of the provided files Thanks so much for your help, and have a n...

    The following are screen grabs of the provided files Thanks so much for your help, and have a nice day! My Java Programming Teacher Gave me this for practice before the exam, butI can't get it to work, and I need a working version to discuss with my teacher ASAP, and I would like to sleep at some point before the exam. Please Help TEST QUESTION 5: Tamagotchi For this question, you will write a number of classes that you...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT