Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a) Write a Javascript Program that prompts user repeatedly to input any number between 0 to 9. If the user inputs any number which is

image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
a) Write a Javascript Program that prompts user repeatedly to input any number between 0 to 9. If the user inputs any number which is less than 0 OR greater than 9 then the program should stop asking the user for input and display "Number not in range". Use Starter File to Create a program save it as Q1a.html file (Marks 16) Hint 1: use break statement with if condition Example: if(userInput=0){ document.write("Number not in range"); break;// this stops the loop Type a me... Example: if(userInput Display "Average score Per Player"+ average ScorePer Player+"
Display "Average score Per Player "+ averageScorePerPlayer+"
" Display "Player Name: "+playerOneName+"
" Display "Scored : "+ playerOneScore+"
" Display "Comparison to average Score:" + playerOneDiffAvg+"
" Display "Player Name: "+playerTwoName+"
" Display "Scored : "+ playerTwoScore+"
" Display "Comparison to average Score:" + playerTwo DiffAvg+"


" Display "Scored : "+ player ThreeScore+"
" Display "Comparison to average Score:" + playerThreeDiffAvg+"

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_2

Step: 3

blur-text-image_3

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

Readings In Database Systems

Authors: Michael Stonebraker

2nd Edition

0934613656, 9780934613651

More Books

Students also viewed these Databases questions