Вы находитесь на странице: 1из 2

2A.

Thunkable is the programming that was used to create my lacrosse trivia game app. The purpose
of the app is to serve as an entertaining way to learn more basic knowledge about the game of
lacrosse being as it is a growing sport. The video illustrates an example of how a user would play
the game. After pressing start, the user is presented a question with 4 pictures as possible
answers to that question, with each following question being presented after clicking “next.” It
shows a red block over an incorrectly clicked answer and a green block over a correct one.
Fifteen points are lost for incorrect answers or running out of time and seventy-five points are
rewarded for correct ones. There is also a 10 second time limit for each question. After clicking
“next”, the app will announce your score to you out loud.

2B.
In terms of UI, it took time to design the layout in a way that was most user friendly and pleasing
to look at. In terms of code there was a decent amount of trial and error. The first major difficulty
I encountered was getting the timer to stop for each question while subtracting points. Along
with another classmate, we found a solution by including an “if, then, else” block inside of the
“clock, .Timer” block. This allowed us to make sure the timer wouldn’t go below zero and it
would subtract points/stop if the timer reached zero. This solution also served as an opportunity
to abstract and not have to use these blocks elsewhere in the code. Another difficulty I faced on
my own was getting the answer options to indicate whether or not they were correct when
clicked. At first I tried changing the background color but this caused issues when going to next
questions. My solution was to upload red and green square pictures and, when clicked, the app
will change the image over the button to red or green dependent on if that was the correct
answer.

2C.
The “set Clock” block serves as a logical concept that ensures the timer is enabled when the
countdown procedure is called. The timer is disabled in other parts of the code when questions
are answered which is why this block is crucial to ensure the countdown procedure will run the
timer when it is needed. The “set global timer” block is a math concept that gives the timer the
“counting down” effect. This is important because a timer that counts up would be confusing to a
user who isn’t expecting it. The final block calls a procedure called, “setTimer”, which ensures
the label that the user is seeing is displaying the amount of time they have left to answer. This
algorithm as a whole is fundamental to my app because it adds a sense of urgency and suspense
to the game while also inflicting a penalty for those who aren’t quick enough.
2D.
This segment of code represents the timer function in my app. Included in it is a mathematical
concept which is followed by two conditionals that determine what the timer should do. It also
includes a logical concept in one the conditions to tell the timer to stop ticking if that condition is
met. This block serves as an abstraction because each conditional implements a procedure that
makes this code segment easier to look at and understand its conditionals. It manages the
complexity of the program by excluding all of the code that doesn’t need to be seen, but is
necessary and included in procedures.

Program Code

Вам также может понравиться