Quiz plan
My blog about the code.org chelsea quiz Imade
My quiz plan:
- Create a quiz about chelsea that has questions that have specific answers that need to be typed and submitted
- Brainstorm & learn about how code.org works
- Create: use what I know to start it by myself then get help if needed
- Finalize: After creating the quiz, review it and run it myself to check and make sure its accurate
Drafting:
For my code it was challenging for me to use an if statement to help me code a question that requires typing and submitting but I figured it out.
here is the code: onEvent(“button3”, “click”, function( ) { console.log(“answerbutton entered text: “ + getText(“text_input3”)); if (getText(“text_input3”) == “1905”) { setScreen(“question3”); } else { setScreen(“incorrectpage”);
Data Abstraction
An example of Data Abstraction in this program is the “font size” chart. It holds multiple selections that represent different sizes. A random number function takes a random size selection from the list and sets the default font size to that selection.
The point
The point of the assignment was to get comfortable with code.org but specifically java script.
# Managing Complexity
An example of complexity management in this quiz is the layout. The quiz is divided into two parts: pasword and exploration in the program. This can easily be seen in the first part of the code, each command has its own defined function.