Question

Create a HTML that asks the client, the points scored by the B’klyn Nets and the Lakers at the end of regular time. The program should display “B’klyn Nets won!” if the Nets won, or “Lakers won!” if t...

Create a HTML that asks the client, the points scored by the B’klyn Nets and the Lakers at the end of regular time. The program should display “B’klyn Nets won!” if the Nets won, or “Lakers won!” if the Lakers won, or “Overtime needed” if there was a tie.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Dear Student ,

As per the requirement submitted above , kindly find the below solution.

Here a new web page with name "client.html" is created, which contains following code.

client.html :

<!DOCTYPE html>

<html lang="en">

<head>

<!-- title for web page -->

<title>Points Scored in a GAME</title>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1">

</head>

<body>

<!-- <script> is used for Javascript -->

<script>

//asking user to enter points B’klyn

var Bklyn=parseInt(prompt("Enter B’klyn points : ","Enter Points"));

//asking to enter points for Lakers

var Lakers=parseInt(prompt("Enter Lakers points : ","Enter Points"));

//checking points

if(Bklyn>Lakers)

{ //if Bklyn points earned is > Lakers

alert("B’klyn Nets won!");//display alert

}

else if(Lakers >Bklyn)

{

//if Lakers points earned is > Bklyn

alert("Lakers won!");//display alert

}

else if(Bklyn==Lakers)

{

//if match tied

alert("Overtime needed");//display alert

}

</script>

</body>

</html>

======================================================

Output : Open web page client.html in the browser and will get the screen as shown below.

Screen 1 :client.html , asking to enter B’klyn Nets points

O Points Scored in a GAME ← → × ⓘ localhost:8080/client.html localhost:8080 says Enter Bklyn points OK Cancel

Screen 2 :client.html , asking to enter Lakers  points

media%2F384%2F384e7310-151a-404f-ad3e-a8

Screen 3:Screen showing result

media%2Ffb8%2Ffb83620f-5ae0-4821-a745-58

NOTE : PLEASE FEEL FREE TO PROVIDE FEEDBACK ABOUT THE SOLUTION.

Add a comment
Know the answer?
Add Answer to:
Create a HTML that asks the client, the points scored by the B’klyn Nets and the Lakers at the end of regular time. The program should display “B’klyn Nets won!” if the Nets won, or “Lakers won!” if t...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Program 7 File Processing and Arrays (100 points) Overview: For this assignment, write a program that...

    Program 7 File Processing and Arrays (100 points) Overview: For this assignment, write a program that will process monthly sales data for a small company. The data will be used to calculate total sales for each month in a year. The monthly sales totals will be needed for later processing, so it will be stored in an array. Basic Logic for main() Note: all of the functions mentioned in this logic are described below. Declare an array of 12 float/doubles...

  • I need a basic program in C to modify my program with the following instructions: Create...

    I need a basic program in C to modify my program with the following instructions: Create a program in C that will: Add an option 4 to your menu for "Play Bingo" -read in a bingo call (e,g, B6, I17, G57, G65) -checks to see if the bingo call read in is valid (i.e., G65 is not valid) -marks all the boards that have the bingo call -checks to see if there is a winner, for our purposes winning means...

  • Please, I need help with program c++. This is a chutes and ladders program. The code...

    Please, I need help with program c++. This is a chutes and ladders program. The code must be a novel code to the specifications of the problem statement. Thank you very much. Assignment Overview This program will implement a variation of the game “chutes and ladders” or “snakes and ladders:” https://en.wikipedia.org/wiki/Snakes_and_Ladders#Gameplay. Just like in the original game, landing on certain squares will jump the player ahead or behind. In this case, you are trying to reach to bottom of the...

  • Program 7 Arrays: building and sorting (100 points) Due: Friday, October 30 by 11:59 PM Overview...

    Program 7 Arrays: building and sorting (100 points) Due: Friday, October 30 by 11:59 PM Overview For this assignment, write a program that will calculate the quiz average for a student in the CSCI 240 course. The student's quiz information will be needed for later processing, so it will be stored in an array. For the assignment, declare one array that will hold a maximum of 12 integer elements (ie. the quiz scores). It is recommended that this program be...

  • can someone help me fix my jeopardy dice game I am having a hard time figuring...

    can someone help me fix my jeopardy dice game I am having a hard time figuring out what i am doing wrong #include #include using namespace std; //this function makes a number between 1 and 6 come out just like a dice int rollDie() { return (rand() % 6+1); } //this function asks the user with a printed statement if they want to roll the dice and gives instructions for yes and no (y/n) void askYoNs(){ cout<<"Do you want to...

  • #include <iostream> #include <iomanip> #include <vector> using namespace std; Part 1. [30 points] In this part,...

    #include <iostream> #include <iomanip> #include <vector> using namespace std; Part 1. [30 points] In this part, your program loads a vending machine serving cold drinks. You start with many foods, some are drinks. Your code loads a vending machine from foods, or, it uses water as a default drink. Create class Drink, make an array of drinks, load it and display it. Part 1 steps: [5 points] Create a class called Drink that contains information about a single drink. Provide...

  • Additional code needed: PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an...

    Additional code needed: PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an order at a fast-food burger joint. This class will be used in Part B, when we work with a list of orders. As vou work through this part and Part B, draw a UML diagram of each class in using the UML drawing tool 1) Create a new Lab5TestProject project in Netbeans, right-click on the lab5testproject package and select New>Java Class 2) Call your...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT