Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

hello working on a program and I am new to javascript need help with displaying the 2 popup here is my html code and javascript

image text in transcribed

hello working on a program and I am new to javascript need help with displaying the 2 popup here is my html code and javascript code

HTML

Assignment 3, Problem 1

Student Scores
Scores

JAVAScript

var array = [];

function start() { var name = prompt( "Enter Students Name" ), score = prompt( "Enter thier score from (1 to 10)", 1 ), inAr; inAr = inputArray(name, score); names( inAr ); socres( inAr ); }

function inputArray(r, c) { var tobj = document.getElementById("input"); array.push(tobj); for(var i = 0; i 1 (8 pts.). Write an HTML document whose sole function is to load and execute a JavaScript file probl.js. The JavaScript code repeatedly prompts for a student's name and then for their score (on a quiz), as shown in the two dialog boxes below. The maximum and minimum scores are the values of the variables minScore (currently set to 0) and maxScore (set to 10) Ed's score (between 0 and 10) Students name Cancel to exit 7 Ed Prevent this page from creating additional dialogs OK Cancel OK Cancel The user exits the loop by clicking Cancel when prompted for a name. Ed 7 The program constructs a table in which each student-score pair entered occurs as a row. The program also keeps track of the number of students Ken5 and their total score, from which the average score is calculated. These values are output as shown at3 students received a total score of22 right (for the case the three students, Ed, Al, and Ken with scores 7, 10, and 5, respectively) The average score is 7.3 The value entered for a score should be tested for validity in a do-while loop. If it is not a number (isNaN (...)), less than minScore, or greater than maxScore, then the user should be prompted again for the value. (What is typed at the prompt is input as a string, but the comparison operators cast it to a number.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle9i Database Administrator Implementation And Administration

Authors: Carol McCullough-Dieter

1st Edition

0619159006, 978-0619159009

More Books

Students also viewed these Databases questions