ComputerScienceExpert

(11)

$18/per page/

About ComputerScienceExpert

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Applied Sciences,Calculus See all
Applied Sciences,Calculus,Chemistry,Computer Science,Environmental science,Information Systems,Science Hide all
Teaching Since: Apr 2017
Last Sign in: 103 Weeks Ago, 4 Days Ago
Questions Answered: 4870
Tutorials Posted: 4863

Education

  • MBA IT, Mater in Science and Technology
    Devry
    Jul-1996 - Jul-2000

Experience

  • Professor
    Devry University
    Mar-2010 - Oct-2016

Category > Programming Posted 24 May 2017 My Price 9.00

Extra 8-1 Develop an Odds and Evens game

  1. Extra 8-1 Develop an Odds and Evens game

     

    *Must use attached code*

    *Image examples attached*

     

    In this exercise, you’ll develop a player-vs-computer game that tallies odd and even numbers until there’s a winner. The interface looks like this:

     

     

     

    After the Play button is clicked, the user will see a series of prompts, like this:

     

     

     

    The game ends when either the player or the computer reaches 50 or when the user enters 999 to quit. In either case, the application should display an appropriate message like: “You WIN!”, “You lose :(”, or “You quit” in the span element to the right of the Play button.

     

  2. Open the HTML and JavaScript files in this folder:
  3.  

    exercises_extrach08odds_evens

     

  4. In the JavaScript file, note that five functions are supplied. The $ function. The getRandomNumber function. A resetFields function that resets the text boxes and message area. The start of a playGame function. And an onload event handler that attaches the playGame function to the click event of the Play button.
  5. Code and test the playGame function. Within this function, use a while loop to get user entries until the player quits or either the player or computer has reached 50. Then, display the appropriate message to the right of the Play button. Within the while loop, consider using a break statement to end the loop if the player quits.
  6. Within the playGame function, call the resetFields function whenever the fields need to be reset.

If you haven’t already done so, add data validation to make sure the entry is a valid number from 0 through 5.

Attachments:

Answers

(11)
Status NEW Posted 24 May 2017 07:05 AM My Price 9.00

-----------

Attachments

file 1495611286-Solutions file 2.docx preview (51 words )
H-----------ell-----------o S-----------ir/-----------Mad-----------am ----------- Th-----------ank----------- yo-----------u f-----------or -----------you-----------r i-----------nte-----------res-----------t a-----------nd -----------buy-----------ing----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n. -----------Ple-----------ase----------- pi-----------ng -----------me -----------on -----------cha-----------t I----------- am----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I w-----------ill----------- be----------- qu-----------ick-----------ly -----------onl-----------ine----------- an-----------d g-----------ive----------- yo-----------u e-----------xac-----------t f-----------ile----------- an-----------d t-----------he -----------sam-----------e f-----------ile----------- is----------- al-----------so -----------sen-----------t t-----------o y-----------our----------- em-----------ail----------- th-----------at -----------is -----------reg-----------ist-----------ere-----------d o-----------n -----------THI-----------S W-----------EBS-----------ITE-----------. ----------- Th-----------ank----------- yo-----------u -----------
Not Rated(0)