CPSI 20023 HW2 Due by Wednesday Sept. 9, 2026
Directions: Hand in by emailing to CPSI20023@gmail.com. Please avoid sending a link to a shared google doc, because the grader might not be able to access it. You can paste the code into the body of an email.
Question 1
What is the minimum percentage score on an assignment? What is the maximum percentage score?
Question 2
Use the AI powered JavaScript tutor at https://claude.ai/public/artifacts/3ea7214e-77a7-4405-a6a0-be778c2b3282. Ask it any question you like about JavaScript. If it asks you to log in, go ahead and log in and it should then work (I tested that after class). I made it using the Claude.ai "artifacts" function. It uses my daily free credits but hopefully they won't run out while you are using it! If you don't have any question, ask it about using buttons to run JavaScript code. Hand in a screenshot of your screen when it is done. Also, describe your experience using this JavaScript tutor app. For example, what is good about it that should be kept? What could be changed to make it better? What if apps like that were used instead of instructors such as myself? ('Cause that may be where things are going.)
Question 3
Build a game that involves the user engaging with various JavaScript operators. The game design should not be a quiz style list of questions and a score based on how many were answered right, because that's been done so many times before; however any other design is fine. You might not know enough JavaScript to create the next top seller on STEAM (although one of our graduates did), but give it a try and see what you can do!
Make a change to the code by hand, in which you make it do a call to alert(), confirm(), or prompt(). You're welcome to use AI to recall how to do such a call, but make the actual change yourself. Hand in the web page containing the game, and a screenshot of your result from playing it.(Don't do this one which is from a previous semester.) Option 1: Build a web page with buttons. If possible add new buttons to the buttons from
the previous HW to begin building a catalog of JavaScript demo buttons,
or you can start a new page with only new buttons if you prefer, however, make the page scalable so you can add more buttons to in
in future HWs. Each new button demos an operator
in JavaScript. Try for quality in the logic (algorithm), the functionality (how
much it can do), and the user experience. Good coding includes comments, good
variable names (which makes the code self-documenting, so you need fewer
comments), and indentation that supports readability. The function prompt() is a
convenient way to get user input, generally considered good for testing and development purposes
though not recommended for production commercial code.
It works well for what it does and is the way we learned so far for reading in inputs.
Above all, have some fun with it! (We can’t grade you on having fun, but still, give it a try!)