This is a guessing game with seven questions, built with some basic HTML, CSS, and JavaScript we've learned thusfar in week one of "Code 201" at Code Fellows in Seattle.
This is my week one project at Code Fellows' "Code 201" course. Each day, we had a "Lab" assignment which added requirements for us to build into our projects. Follow my journey into the world of coding here on Twitter.
- Design a guessing game using the prompt() method.
- The questions in the guessing game must require a mix of yes/no answers, and user input must accept either y/n or yes/no responses, with either .toUpperCase() or .toLowerCase() used to validate the user input and accommodate users entering all-caps Y/N or YES/NO answers, too.
- Use useful and descriptive console.log() messages in the JS console.
- Use some amount of CSS to style the page.
- Follow the Add, Commit, Push process. It should be evident in GitHub that commits are made regularly, and with good commit messages that explain the WHY of the commit.
- HTML, CSS, and JavaScript must be cleanly written with correct indentation and syntax.
- Avoid declaring your own functions
- Add a sixth question to my guessing game that takes numeric input by prompting a user to guess a number, and indicates to the user whether the guess is "too high" or "too low", and gives the user exactly four opportunities to get the correct answer.
- Add a seventh question to my guessing game that has multiple possible correct answers that are stored in an array, so that even more of my programming skills are showcased. For now, I will structure this question so that the user has six tries to get a single correct answer, and upon using up those tries OR getting a correct answer, displays a message to the user indicating all of the possible correct answers.
- Keep a tally of the total number of correct answers given by the user, and at the end of the game, tell the user how well they did with a personalized custom message that includes the number of correct answers and also addresses the user by name.
This iteration was done using a pair programming technique with one of my classmates at Code Fellows. For this lab, I acted as Navigator on this project and Caroline Anne acted as Driver.
Caroline wrote some JavaScript to wrap the logic and variables for each of the questions into functions and call these functions in order.
This iteration was mainly focused on CSS styling throughout.
The guessing game begins by clicking the button at the top of the page. If the game is played, each question is displayed on the page.
Built with the help of my Code Fellows instructors, TA's, and classmates.
Lab 3: Special thanks to classmate Chris Morton and his help with the final question.
Lab 5: My classmate Caroline Anne.