Solution:
CODE:-
========================================= index.html =============================
<!DOCTYPE HTML>
<html>
<head>
<title>
Play the Game
</title>
</head>
<body>
<!-- When user click on the below text the factorial() will call
by using pre-defined onclick attribute-->
<div id="game" onclick="factorial()">
Play a Game
</div>
<!-- This div is used for the show the output -->
<div id="output">
</div>
<!-- Javascript-->
<script type="text/javascript">
//Function for calculate the factorial
function factorial()
{
//prompt box open for get the number from user
var number = prompt('Please Insert a Number'); //User input will
store on variable number.
//Here,Check the user enter a Number or String
if(isNaN(number))
{
//if user enter anything else except number then alert box will
diplay to the use.
alert("Please Enter a Number only");
}
else
{
//if user enter number then find the factorial.
//variable fact initialize with 1.
var fact=1;
//variable data is used to store the output (factoail of each
number).
var data="";
//loop will continue till the number which provided by
user
for (var i = 1; i <= number; i++)
{
fact *=i;
data += "<html><body><center>";
data += fact;
data +=
"<hr><br></center></body></html>";
}
//here the output will show on the div tag which we have
declared above.
output.innerHTML = "<html><center><b>Below are
the factorials of all the numbers from 1 to " + number +
"<br><br></b>" + data +
"</center></html>";
//by using this line the above div tag with id game will be
hide.
document.getElementById("game").style.display = "none";
}
}
</script>
</body>
</html>
OUTPUT:-
Simple Webpage

Prompt Box open when user click the text:
Factorial of user input:

When user input is anything except number:

Alert prompt:
Thank you :)
1. Create a web page that would display the following message: Play the Game When we...
Create an HTML5 page that contains a form to collect the following data. The text in bold indicates the id value that should be assigned to each html control: Product (drop down list) product – iPad, iPhone 6S, Galaxy 5S, Moto X, and so on Quantity (number) quantity Unit price (number) unit_price Discount (%)(number) discount_rate Date (date) order_date First Name (text box) first_name Last Name (text box) last_name Payment type (drop down list) payment_type – Visa, Master, Discover, Amex, and...
HTML / CSS
Content Requirements
Create a home page with the following elements and settings:
Set the background, font colors, and “theme” to match those used
in lab assignment #1 using an external css file; inline styling
should be used only where necessary to override styling from the
external css
H1 element, centered at the top of the page, with “Thank you for
choosing Your Company Name. . . “ text*
Div or other container with at least 5 sentences...
HTML Web Page project:
Need help to create a web page exactly as the example below
using HTML. I need the source code.
Page 1 of CA272 Midterm Welcome to your name's CA272 Midterm Text In this class, I learned how to... 1. create an X)HTML web page, where I can 2. change the size of my font, 3. change the color of my fonts, 4. change my font style, 5. and change the background color of my web page....
This needs to be done using c++ No vectors or arrays can be used since we haven't learned them yet! Write a program that simulates a slot machine. The slot machine should have the following characteristics: - 3 view windows to display items on a wheel. Typically, these are cherries, bars, etc. - each wheel will randomly select a number 1-7. - the user will be charged 5 tokens to spin the wheels Winning combinations will be as follows: -...
JAVA We will write a psychic game program in which a player guesses a number randomly generated by a computer. For this project, we need 3 classes, Player, PsychicGame, and Driver. Description for each class is as following: Project Folder Name: LB05 1. Player class a.Input - nickName : nick name of the player - guessedNumber : a number picked for the player will be assigned randomly by a computer later. b. Process - constructor: asks a user player’s nickName...
Create a modification to the Hangman game to provide
enhancements for the user experience. Share the code in text format
in this thread.
Could someone please assist me coming up with a modification
in Python?
4. EXERCISE 4 The following code implements a very simple Hangman game: word = 'underutilise guesses = [] user_input = " while user_input == '0': user_input = input ("Enter a letter, or 0 to give up:') guesses.append(user_input) output = '' for letter in range(1, len...
MyMenuFrame.java, MyMenuFrameTest.java, a. The title of the frame is “MyNotepad”. b. Create and add border layout. c. Create a text area to display contents. Add the text area to the center of the border layout. d. Create a menu bar. e. Create a file menu. Set mnemonic for file menu. It is “F”. File menu includes three menu items. f. Add a separator between each menu item in the file menu. i. Open 1. Add a short cut for...
In this assignment you will combine HTML, PHP, and SQL in order to create a web form that allows a manager to add films to the sakila database. You will also create a method to allow the manager to view a list of all films along with their related information, and a list of actors in the movies. Task 1 Create an initial HTML page titled manager.html with 2 buttons. The first button will be labeled “View Films”, and the...
1) Create a simple AJAX page that converts US Dollars to British Pounds - (use exchange rate as of 10/24 - $1 = .80 British Pounds) 2) Your page should have a text box and a button. When the user presses the button, the text box should be validated in JavaScript to make sure the user has entered a numeric value and has not left the field blank. If the form is valid, an AJAX call (XMLHTTP Request) should be...