1. Describe your solution for the second project that added a Search button. Provide a screenshot of the search button click code that uses a complex algorithm with loops and lists. Why was a loop necessary?
Answer
In order to keep score i had to refactor my AnswerButton coding by implementing a if , then else block that fed into what was a true or false block. This programmed the app to set the selected index to false in the CorrectanswersList, which is another list that i had to create. After the selected index is set to true the global score is increased by one.
A loop was necessary because without one i would have had to code the linear search for every possible search, not just use variables and a loop.
2. Write AP text-style pseudocode for a linear search that searches through a list to find an item x. It should display found if the x is equal to an item in the list.
Answer
When bottonsearch click, for each number from 1 to 100 by 1. When value = x, set textbox.text to “found”
3. Give brief descriptions of the enhancements you added to your app for the third project, a quiz topic of your own choosing. Provide screenshots of important blocks and describe how you used them to solve certain programming problems.
Answer
I did not a new topic for my quiz.
4. To practice for the Create project prompt, grab a screenshot of a program code segment from your project that implements an algorithm that includes two or more algorithms within it and includes mathematical and/or logical concepts. An ideal algorithm is a procedure that you created that includes calls to other procedures that you created, where at least one of those includes math or logic (ifs or loops). Describe how each of the two algorithms within the bigger algorithm functions independently as well as in combination to form a new algorithm.
Answer
The first algorithm in this algorithm is the search list, which uses a linear search to scan through different lists to find a result. The second algorithm is the result which sets the text box displaying the text to the outcome of the search and storing the value in an index.