Write JavaScript code to allow a school teacher to enter the names of his/her students and the final grade for each student. Use parallel arrays named student[] and grade[] and a sentinel value so that the teacher can enter as many students as desired.
var student =new Array (200);
var grade=new Array(200);
student[]= prompt( "what is your students name");
document.getElementbyId(student[])
grade[]= prompt("what is the" + student[]+ " grade");
document.getElementbyId(student[])
document.write (student[] + " "+ grade[]);
Explanation::
Code:
<!DOCTYPE html>
<html>
<body>
<p>Students data is as follows</p>
<b>Name Grade</b>
<script>
var student = new Array(200);
var grade = new Array(200);
var i=0;
while(i<200){
student[i]=prompt("What is your students name");
if(student[i]=="-1"){
break;
}
grade[i]=prompt("What is the "+student[i]+" grade");
document.write("<br>"+student[i]+" "+grade[i]);
i++;
}
</script>
</body>
</html>
_____________________________________________________________
OUTPUT::
Students data is as follows
Name Grade
Steve 89
Roger 90
Tom 56
Write JavaScript code to allow a school teacher to enter the names of his/her students and...
What is the problem with this code? <html> <body> <script type="text/javascript"> //Declare variables var numStudents; var index; var sName; var ES = ""; var BR = "<br />"; var PA = "<p />"; //Print statement document.write("Student Name Entry Program" + PA); //Prompt for number of students to add numStudents = prompt("Enter the number of student names to add: "+ ES); //Loop through numStudents of times, prompting for student names for(index = 1; index <= numStudents: index++) { sName = prompt("Enter...
A teacher wants to create a list of students in her class. Using the existing Student class in this exercise. Create a static ArrayList called classList that adds a student to the classList whenever a new Student is created. In the constructor, you will have to add that Student to the ArrayList. Coding below was given to edit and use public class ClassListTester { public static void main(String[] args) { //You don't need to change anything here, but feel free...
A teacher wants to create a list of students in her class. Using the existing Student class in this exercise. Create a static ArrayList called classList that adds a student to the classList whenever a new Student is created. In the constructor, you will have to add that Student to the ArrayList. Coding below was given to edit and use public class ClassListTester { public static void main(String[] args) { //You don't need to change anything here, but feel free...
Starting Out with c++ Student Line Up Using Files A teacher has asked all her students to line up according to their first name. For example, in one class Amy will be at the front of the line, and Yolanda will be at the end. Write a program that will prompt the user for a filename that contains the student names. Names should be read in until there is no more data to read. As the names are read in,...
Please help me with this code for javascript. <!DOCTYPE html> <html> <head> <title>Strings and Arrays</title> <script> function wrangleArray() { var string1 = prompt("Enter: This class is going to fast");//Must be entered by the user var string1 = "";//Is this right? I want that string to change later by a series of prompt questions document.getElementById("div1").innerHTML = "<p>" + sentence + "</p>"; var words = sentence.split(" ");//I need to convert my string to an Array is this the way to do it?...
Write a C++ program that asks user number of students in a class and their names. Number of students are limited to 100 maximum. Then, it will ask for 3 test scores of each student. The program will calculate the average of test scores for each student and display with their names. Then, it will sort the averages in descending order and display the sorted list with students’ names and ranking. Follow the Steps Below Save the project as A4_StudentRanking_yourname....
Language: C++ Write a program that will allow the instructor to enter the student's names, student ID, and their scores on the various exams and projects. A class has a number of students during a semester. Those students take 4 quizzes, one midterm, and one final project. All quizzes weights add up to 40% of the overall grade. The midterm exam is 25% while the final project 35%. The program will issue a report. The report will show individual grades...
In C++, write a complete program that receives a series of student records from the keyboard and stores them in three parallel arrays named studentID and courseNumber and grade. All arrays are to be 100 elements. The studentID array is to be of type int and the courseNumber and grade arrays are to be of type string. The program should prompt for the number of records to be entered and then receive user input on how many records are to...
Your assignment is to write a grade book for a teacher. The
teacher has a text file, which includes student's names, and
students test grades. There are four test scores for each student.
Here is an example of such a file:
Count: 5
Sally 78.0 84.0 79.0 86.0
Rachel 68.0 76.0 87.0 76.0
Melba 87.0 78.0 98.0 88.0
Grace 76.0 67.0 89.0 0.0
Lisa 68.0 76.0 65.0 87.0
The first line of the file will indicate the number of students...