Question: Please show all the work nice and neat Problem 1 Using your template, create a script that goes in the HEAD of the document that

 Please show all the work nice and neat Problem 1 Using
your template, create a script that goes in the HEAD of the
Please show all the work nice and neat

Problem 1 Using your template, create a script that goes in the HEAD of the document that stores your first name in one variable, your last name in another variable, and your age in another variable. You don't need to get the user to type in the info, just store it by hand in variables. Then use the alert) command three times to output a message for each of these three things Your first name is NAME Your last name is LASTNAME Your age is AGE where NAMELASTNAME and AGE are actually the values that you stored in the three variables. This is possibly deceptively simple. The solution will take a total of six lines of code; it all needs to go in the HEAD script tag: and we've done every single bit of this already in the examples Well it's not always practical or even possible for the programmer to hard-code the variable values in This program should actually take input from the user instead So let's rewrite the code from problem 1 so that the user gets to type in the input. To do this, use the prompt) command three times, each time prompting for the name, last name, and age. Then use the aler%) command to display the value (like in problem 1 )If you get stumped on this one, look at all ofthe examples where we used prompt(). it's pretty simple. Problem 3 Ok, now that we've gotten this much of the program to run, lets add a little functionality. Adding to the program above, let's ask the user to input their monthly salary and then compute what their annual salary is from that. Then let's pop up an alert) to tell them what their annual salary is. All you need to do is add a line of code that promptOs them for their monthly salary, then alert0 the salary times 12 Two more lines of code than in problem 2 Problem 4 Now that we can compute an annual salary, we need to calculate taxes, and alert) what the take-home pay after taxes will be. This will require a littile re-work of the program, and it will require that we save the result of the annual salary calloulation in a variable Let's say that taxes consume 15% of your salary, leaving you with 85% of your gross annual salary. You need to store the value of the annual salary in a variable called annual salary, then compute the value of another variable called net-salary. YouT do this by mutplyng annual-salary by .85, and store in net salary How do you store a value in a variable? You've been doing it all along. Whenever you use the equals (caled the assignment operator). you are assigning the thing on the left the value of the thing on the right So ifyou wanted to create a variable called my-salary that had the value of $100,000 multipled by 85, it would look like this: var my_salary 100000 85 Problem 5 Write a script that goes in the HEAD script area that does the following . Prompts the user for their first name and stores it in a variable called first name Prompts the user for their last name and puts it in a variable caled last name Prompts the user for their work expenence, in years, and puts it in a variable caled * Prompts the user to type YES they have a master's degree, NO otherwise Checks to see if the user either has a master's degree OR the have at least 8 years experience: if they have either, display an alertbox that congratulates them; else, alert them a message that says sorry, no dice *

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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

Students Have Also Explored These Related Databases Questions!