Overall:

I felt pretty good about my Final Attempt. I did struggle on a few questions and missed 6 in total. A Majority of the questions I missed were regarding the analysis of a specific piece of code. I was unsure on what the code did exactly and took an educated guess on a few of them. I feel that I could have done better if I had revised my answers as I feel that I could have caught some simple mistakes. Also I found it difficult to understand exactly what some of the coded segments were implying due to the format.

Specifics:

I was still confused on a few questions even after reviewing the answers. For example, question 35 was related to setting the value of a variable based of an existing value of time. I reviewed the answer and realized that my selected answer was assigning the opposite value. Instead of setting 30 for when time is greater than 1 I was setting 50. Although I see why Answer A is correct, I am still confused as why “maxPS=50” is placed above the if else statement.

Question 36:

Consider the following code segment, which is intended to store ten consecutive even integers, beginning with 2, in the list evenList. Assume that evenList is initially empty.

            i ←
            ←
            1
            REPEAT 10 TIMES
            {
            <MISSING CODE>
            }
            Which of the following can be used to replace <MISSING CODE> so that the code segment works as intended?

My code did not generate the correct list. Instead of initializing 1 it initialized 0.

Question 40: I said that nothing will be displayed. This is incorrect as the code segment will display regardless of x and y values.

Question 41: I selected the initial value of P rather than the value of r after the code has ran.

Question 45:

            Consider the following code segment.

            theList ←
            ←
            [-2, -1, 0, 1, 2]
            count1 ←
            ←
            0
            count2 ←
            ←
            0
            FOR EACH value IN theList
            {
            IF(value > 0)
            {
            count1 ←
            ←
            count1 + 1
            }
            ELSE
            {
            count2 ←
            ←
            count2 + 1
            }
            }
            What are the values of count1 and count2 as a result of executing the code segment? I am unsure of my mistake and need help understanding why this occurred.

Question 48: My answer was incorrect as Y is changing after the code segment runs.

What Next?:

For the next final or test I feel that I can work on rereading and revisiting questions. By simply returning to a question with a blank mind, I feel like I could have approached the question differently. Many times I felt a bit confused by the format of the code and variables included. This confusion caused many of my mistakes and I feel that I could have answered them correctly by simply revisiting the question.

Alt text