Game: User will pick one number between 1-9. Computer will pick one number randomly between 1-9....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Game: User will pick one number between 1-9. Computer will pick one number randomly between 1-9. If the sum of the numbers will be an even number, then the user will win otherwise computer will win. Instructions: 1. Make a folder named firstname-lastname-a1 2. Create a simple odd even game. 3. Make two HTML files and save them with the names index.html and game.html within the firstname-lastname-al folder. 4. The <title> tag should read: Assignment 1 for <Your Name>. 5. Display the following information in <H1> tag as heading in the index.html page: Assignment 1 Web Programming Your FirstName Last Name 6. Add a <hr> tag before and after the above heading. 7. After the <hr> tag, display the game instructions on how to play the game. 8. Add a start button or link that navigates the user to game.html 9. On the game.html file, implement the game using JavaScript. 10. Ask the user to choose the number using a prompt() dialog box. a. Get inputs for user's turn. User should enter any number between1-9 For e.g. 2 b. Keep asking the user their move if the user enters some invalid input. 11. Then the computer chooses its number randomly and is displayed in an alert() dialog box. 12. The result is displayed on the screen using alert() dialog box. 13. The user should be asked using a confirm() dialog box if they want to play again, and a running score should be kept. 14. If the user selects not to continue, display the final score of the user and the computer, and the winner using alert () dialog box. 15. Add an Exit button or link on game.html that navigates the user back to index.html. 16. Add CSS. Game: User will pick one number between 1-9. Computer will pick one number randomly between 1-9. If the sum of the numbers will be an even number, then the user will win otherwise computer will win. Instructions: 1. Make a folder named firstname-lastname-a1 2. Create a simple odd even game. 3. Make two HTML files and save them with the names index.html and game.html within the firstname-lastname-al folder. 4. The <title> tag should read: Assignment 1 for <Your Name>. 5. Display the following information in <H1> tag as heading in the index.html page: Assignment 1 Web Programming Your FirstName Last Name 6. Add a <hr> tag before and after the above heading. 7. After the <hr> tag, display the game instructions on how to play the game. 8. Add a start button or link that navigates the user to game.html 9. On the game.html file, implement the game using JavaScript. 10. Ask the user to choose the number using a prompt() dialog box. a. Get inputs for user's turn. User should enter any number between1-9 For e.g. 2 b. Keep asking the user their move if the user enters some invalid input. 11. Then the computer chooses its number randomly and is displayed in an alert() dialog box. 12. The result is displayed on the screen using alert() dialog box. 13. The user should be asked using a confirm() dialog box if they want to play again, and a running score should be kept. 14. If the user selects not to continue, display the final score of the user and the computer, and the winner using alert () dialog box. 15. Add an Exit button or link on game.html that navigates the user back to index.html. 16. Add CSS.
Expert Answer:
Answer rating: 100% (QA)
CODE indexhtml Home bodybackgroundcolorlinenh1textaligncent... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
A square matrix is stochastic if the sum of the entries in each column is one. The Google matrix is computed by taking a combination G = * H + (1 - ) * S of two stochastic matrices. Show that G must...
-
Implement the following two methods: /** Return true if the sum of every two sides is * greater than the third side. */ public static boolean isValid( double side1, double side2, double side3) /**...
-
The sum of two numbers is 17. Their difference is 41. Find the numbers.
-
A business wishes to have $80,000 ten years from now to make a down payment on a capital asset. How much money would the business need to invest in equal annual payments at a compound interest rate...
-
How did the European Monetary System limit the economic ability of each member nation to set its interest rate to be different from Germany's?
-
MicroDisk is the market leader in the Secure Digital (SD) card industry and sells memory cards for use in portable devices such as mobile phones, tablets, and digital cameras. Its most popular card...
-
Reconsider the data from Problem 56. What is the capital recovery cost of Model 334A? Data from problem 56 Octavia Bakery is planning to purchase one of two ovens. The expected cash flows for each...
-
Two different manufacturing processes are being considered for making a new product. The first process is less capital-intensive, with fixed costs of only $50,000 per year and variable costs of $700...
-
The accompanying data represent the approximate population, in millions, of the 20 most populous cities in the world. 13.5 11.7 10.4 8.4 7.8 13.3 11.6 9.4 8.4 7.7 12.7 11.5 9.3 8.2 7.4 12.3 11.3 8.7...
-
The Golden Oranges Nursery, which provides facilities for pre-school children on a commercial basis, is preparing its cash budget for next year. A profile of the estimated revenues and expenses for...
-
1. Define the "tent map," T: [0, 1] [0, 1]: T(x) = { J 2x, 2-2x, and define the "doubling map*," D: [0, 1] [0, 1]: 2x, 2x-1, 0, D(x) = if 0 < x < 1/1, xi. if if 0 < x < 1/1, if x < 1, if x = 1,...
-
How does a third-party complaint compare to a crossclaim? What is the key difference?
-
Let's say that you wanted to represent aspiring football players in Alabama, what type of educational requirements would you have to possess and in addition to educational requirements are there any...
-
What laws does military drones violate in war and law enforcement? List the laws and argue for and against each.
-
Judges at times are not given a lot of lee way in their decision making when it comes to sentencing. Do you think the judicial system needs to afford them more discretion?
-
Can attorneys bill the clients for whom they are traveling, and simultaneously bill the other clients for whom they are making phone calls and other communication? If not, whose bill should get cut?
-
Pluto plc (Pluto) is a financial services institution which is organised into various departments along product based lines. The main products which Pluto sells are mortgages, loans and credit cards....
-
Fahrad Inc. sells all of its product on account. Fahrad has the following accounts receivable payment experience: Percent paid in the month of sale .........10 Percent paid in the month after the...
-
The report How Teens Use Media (Nielsen, June 2009) says that 67% of U. S. teens have a Facebook page that they update at least once a week. Suppose you plan to select a random sample of 400 students...
-
The article Unmarried Couples More Likely to Be Interracial (San Luis Obispo Tribune, March 13, 2002) reported that 7% of married couples in the United States are mixed racially or ethnically....
-
Researchers at the University of Utah carried out a study to see if the size of the fork used to eat dinner has an effect on how much food is consumed (Food Network Magazine, January 2012). The...
-
Many hotel jobs are inherently dead end; for example, maids, laundry workers, and valets, either have no great aspirations to move up, or are just using these jobs temporarily, for instance, to help...
-
Using what you learned in this chapter of Dessler Human Resource Management, build on the companys new system by recommending two more specific career development activities the hotel should...
-
Should other employees (cleaner/spotters, counter people) be put on a similar plan? Why or why not? If so, how exactly?
Study smarter with the SolutionInn App