JavaScript
Lab Assignment – Mad LibsSubmit Assignment
- Due Monday by 11:59pm
- Points 20
- Submitting a file upload
-
JavaScript
Lab Assignment – Mad LibsSubmit Assignment
- Due Monday by 11:59pm
- Points 20
- Submitting a file upload
- File Types zip
Mad Libs
I’m not sure if any of you remember of have ever played Mad Libs (Links to an external site.). It’s a simple game. One person asks another to provide names, places, numbers, adjectives, and adverbs without knowing the context. Then those answers are filled in to make a story. It usually ends up being fairly silly.
I want you to create a Mad Libs game using the information from the lesson. There are a few requirements.
- The story must be printed out to the console.
- You must ask for a minimum of six (6) pieces of information.
- You must request at least three numbers add a number greater than one to each of them. What you decide to add is up to you but each value must be ADDED (not subtracted) to another number that is larger than one, and the results should be correct.
- Keep it safe for work. I’m going to have you post your work to the discussion forum and you’ll have to play the games your classmates create so keep it professional or you won’t get a passing grade.
- Submit both an HTML and JS file. I will start the program by opening the HTML file.
- After you are done, submit your work to the Canvas discussion board for this lesson.
- For extra credit use something from the Math class to perform a calculation to one of your numbers after you have done valid addition with it.
Note: This assignment has an extra credit component. To earn extra credit you must first earn a perfect score on the base requirements for the assignment.
Some general coding guidelines
- Throughout this class, prefer single vs double quotes around strings unless you have a good reason such as having single quotes in the string.
- Use camelCase style variable names rather than snake_case or kebob-case.
- Put a line break after every command.
- Comments are helpful. Don’t be afraid to use them.
Good example:
let myName = ‘Bob’;
// Capture the first letter of the name.
let firstInitial = myName[0];
Bad example:
let my_name = “Bob”; let first_initial = myName[0];
Mad Libs RubricMad Libs
RubricCriteriaRatingsPtsThis criterion is linked to a Learning OutcomeSix inputs captured5.0 ptsFull Marks0.0 ptsNo Marks5.0 ptsThis criterion is linked to a Learning OutcomeThree numbers captured with numeric data type9.0 ptsFull Marks0.0 ptsNo Marks9.0 ptsThis criterion is linked to a Learning OutcomeCaptured data used in story output.2.0 ptsFull Marks0.0 ptsNo Marks2.0 ptsThis criterion is linked to a Learning OutcomeProgram output and formatting2.0 ptsFull Marks0.0 ptsNo Marks2.0 ptsThis criterion is linked to a Learning OutcomeCode quality and cleanliness1.0 ptsFull Marks0.0 ptsNo Marks1.0 ptsThis criterion is linked to a Learning OutcomeFile naming conventions1.0 ptsFull Marks0.0 ptsNo Marks1.0 ptsThis criterion is linked to a Learning OutcomeExtra Credit – Math class method used.2.0 ptsFull Marks0.0 ptsNo Marks2.0 pts
Mad Libs
I’m not sure if any of you remember of have ever played Mad Libs (Links to an external site.). It’s a simple game. One person asks another to provide names, places, numbers, adjectives, and adverbs without knowing the context. Then those answers are filled in to make a story. It usually ends up being fairly silly.
I want you to create a Mad Libs game using the information from the lesson. There are a few requirements.
- The story must be printed out to the console.
- You must ask for a minimum of six (6) pieces of information.
- You must request at least three numbers add a number greater than one to each of them. What you decide to add is up to you but each value must be ADDED (not subtracted) to another number that is larger than one, and the results should be correct.
- Keep it safe for work. I’m going to have you post your work to the discussion forum and you’ll have to play the games your classmates create so keep it professional or you won’t get a passing grade.
- Submit both an HTML and JS file. I will start the program by opening the HTML file.
- After you are done, submit your work to the Canvas discussion board for this lesson.
- For extra credit use something from the Math class to perform a calculation to one of your numbers after you have done valid addition with it.
Note: This assignment has an extra credit component. To earn extra credit you must first earn a perfect score on the base requirements for the assignment.
Some general coding guidelines
- Throughout this class, prefer single vs double quotes around strings unless you have a good reason such as having single quotes in the string.
- Use camelCase style variable names rather than snake_case or kebob-case.
- Put a line break after every command.
- Comments are helpful. Don’t be afraid to use them.
Good example:
let myName = ‘Bob’;
// Capture the first letter of the name.
let firstInitial = myName[0];
Bad example:
let my_name = “Bob”; let first_initial = myName[0];
Mad Libs RubricMad Libs
RubricCriteriaRatingsPtsThis criterion is linked to a Learning OutcomeSix inputs captured5.0 ptsFull Marks0.0 ptsNo Marks5.0 ptsThis criterion is linked to a Learning OutcomeThree numbers captured with numeric data type9.0 ptsFull Marks0.0 ptsNo Marks9.0 ptsThis criterion is linked to a Learning OutcomeCaptured data used in story output.2.0 ptsFull Marks0.0 ptsNo Marks2.0 ptsThis criterion is linked to a Learning OutcomeProgram output and formatting2.0 ptsFull Marks0.0 ptsNo Marks2.0 ptsThis criterion is linked to a Learning OutcomeCode quality and cleanliness1.0 ptsFull Marks0.0 ptsNo Marks1.0 ptsThis criterion is linked to a Learning OutcomeFile naming conventions1.0 ptsFull Marks0.0 ptsNo Marks1.0 ptsThis criterion is linked to a Learning OutcomeExtra Credit – Math class method used.2.0 ptsFull Marks0.0 ptsNo Marks2.0 pts