JavaScript найти среднеюю оценку.

Гость3 года в сервисе
Данные заказчика будут вам доступны после подачи заявки
28.01.2022

Пользователь вводит 3 оценки, найти среднее.

Ask user to enter Name , mark1 ,mark2 and mark3 using prompt in JavaScript .

The HTML page will have para(p tag) with id result .

HTML page will also have a button Print Result . On click of the button , printResult() should be called

In JavaScript , validate that the marks are numbers and not string. If user enters string then display error in result id that ,”you cannot

enter string ,please refresh the page again “

On clicking on Print Result button , call a function printResult() form javascript.

you need to find the average of the marks (you may need to use parseInt()—refer page48 week 1 PPT)

and print below grades along with name in result id(hint : use document.getElementById)

if average >=90 then print " Awesome"

if average>=80 then print " very good"

if average >=50 then print “OK”

if average less than 50 then print Fail