Design and create a Web page named states.html that quizzes the user on state capitals. The layout

Question:

Design and create a Web page named states.html that quizzes the user on state capitals. The layout of the page is entirely up to you. However, the page should contain a text box in which the user can specify the number of questions on the quiz. After processing this input, the page should repeatedly ask the user to identify the capitals of randomly selected states until the desired number of questions has been posed. Once the quiz is complete, the user's score (number of correct answers and percentage correct) should be displayed in the page.

Your page should store the states and state capitals in parallel arrays, as shown in Figure 17.23. To select a state for each quiz question, your page will need to generate a random index from 0 to 49 and assign it to a variable (for example, state-Index). Then, the state name can be accessed as STATES [state-Index]. Once the user enters a guess, this input should be checked against the state capital stored at CAPITALS [state-Index]?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: