Lab2
Lab2
LAB 2
Random Story Generator
DESCRIPTION
Using the HTML, CSS and JavaScript code provided to you, modify the JavaScript so that
the page that does the following:
1. Generates a random story in a paragraph when the user pressed the button.
2. Replaces the default name "Bob" in the story with a custom name, but only if a
custom name is entered into the "Enter custom name" text field before the generate
button is pressed.
3. Converts the default imperial weight (pounds) and temperature (°F) values to kilograms
(kg) and centigrade (°C) if the “metric” radio button is checked before the generate
button is pressed.
4. Will generate another random silly story if you press the button again (and again...).
INSTRUCTIONS
Follow along with the numbered instructions inside the code comments in the
provided JavaScript file.
EVALUATION
Criteria Mark
The above tasks have been completed /10
Follow these steps to submit your project files to GitHub. It’s crucial that you commit and push your
changes each time you make an update. Failure to follow these steps for each and every assignment
and lab will result in an immediate zero.
1. Add Files:
o Run git add . to stage all your files for the first commit.
2. Commit Your Files:
o Run git commit -m "Initial commit" to commit the files to your local repository with a
message.
1. Check Your Repository: Go to your GitHub repository in your browser and verify that your files
have been uploaded and the changes are reflected.
1. Share the Link: Copy the URL of your GitHub repository and submit it to your teacher or share it
with your classmates as required.
Important Notice:
If you do not follow these steps for each and every assignment and lab, you will receive a zero right
away. It is essential to keep your work up-to-date on GitHub as this will also serve as proof of your
progress and effort.