A web page displays an input box that a user can use to a enter a grade from a test and a button that when pressed tells the user what letter grade they received for that test. Assume that the grade is stored in an integer named grade and you will put the letter grade in to a string variable named letter.
Write one or more if-statements in Javascript that will set the correct value into letter assuming the standard break points of
0-59 -> F
60-69 -> D
70-79 -> C
80-89 -> B
90-100 -> A
<!DOCTYPE html>
<html>
<head>
<script>
function myFunction() {
var grade;
var
score=parseInt(document.getElementById("score").value);
if(score>=90)
grade="A";
else if(score>=80)
grade="B";
else if(score>=70)
grade="C";
else if(score>=60)
grade="D";
else
grade="F";
document.getElementById("demo").innerHTML = "Grade : "+grade;
}
</script>
</head>
<body>
<input id="score"/>
<button onclick="myFunction()">Test it</button>
<p id="demo"></p>
</body>
</html>

Note : Please comment below if you have concerns. I am here to help you
If you like my answer please rate and help me it is very Imp for me
A web page displays an input box that a user can use to a enter a...
Create a web page like the one shown here. The user can enter a
number n, and when the button is clicked, the Harshad numbers
between 1 and n are displayed:
linking an html file with a javascript file.
Count 'em! Find and Count the Niven Numbers Between 1 and: 200 Number of Nivens: 59 Niven Numbers: 1 23456789 10 12 18 20 21 24 27 30 36 40 42 45 48 50 54 60 63 70 72 80 81...
Write a C++ program that asks the user for an exam score. The program displays on the screen the appropriate later grade as per the schema below: a. A: [90-100] b. B: [80:89] c. C: [70:79] d. D: [60:69] e. F: otherwise
Write a program that asks the user to enter five test scores. The program should display a letter grade for each score and the average test score. Design the following functions in the program: calcAverage—This function should accept five test scores as arguments and return the average of the scores. determineGrade—This function should accept a test score as an argument and return a letter grade for the score (as a String), based on the following grading scale: Score Letter Grade...
Please help me~~~~ using javascript, Display a text field so that the user can enter an integer. Display two buttons “Start Animation” and “Stop Animation”. When the button “Start Animation” is clicked, the web page displays an animated times table in the following manner. For example, if the user entered the number 6, then the animation displays 6 x 1 = 6, one second later it replaces it with 6 x 2 = 12, one second later it replaces it...
Using Java, write a program that teachers can use to enter and calculate grades of individual students by utilizing an array, Scanner object, casting, and the print method. First, let the user choose the size for the integer array by using a Scanner object. The integer array will hold individual assignment grades of a fictional student. Next, use a loop to populate the integer array with individual grades. Make sure each individual grade entered by the user fills just one...
Design a function named max that accepts two integer values as arguments and returns the value that is the greater of the two. For example, if 7 and 12 are passed as arguments to the function, the function should return 12. Use the function in a program that prompts the user to enter two integer values. The program should display the value that is the greater of the two. Need Variable lists, Psuedocode, ipo chart, Flow Chart, and a python...
Write a C++ program that will provide a user with a grade range if they enter a letter grade. Your program should contain one function. Your function will accept one argument of type char and will not return anything (the return type will be void), but rather print statements to the console. Your main function will contain code to prompt the user to enter a letter grade. It will pass the letter grade entered by the user to your function....
A new school in the area has hired you to build a grade report software for them. The school wants the software interaction to be as follows: . The user (teacher) shall input the name of the student being processed. (10 pts) The user (teacher) shall input five (5) test scores for the student. (10 pts) • The software shall calculate and display the average of the test scores as the final grade. (20 pts) The software should also display...
JavaScript (Please debug this code) When a user enters a string in the input box, the program is designed to add the string to an array. When the array reaches a certain length, the program displays all the users' entries in a list on the page. When you finish debugging, the user's entry in the input box should be cleared each time the submit button is clicked. Additionally, after five strings are submitted, the entire list of submitted strings should...
1. Create a program that takes a numerical score and outputs a letter grade. 2. In this program, create two void functions titled makeScore and theGrade with an int argument. 3. The function makeScore should have a Reference parameter and theGrade should have a Value parameter. Note: Specific numerical scores and letter grades are listed below: 90-100 = Grade A 80-89 = Grade B 70-79 = Grade C 60-69 = Grade D 0-59 = Grade F 4. The function makeScore...