Proof of Completion (Score: 33/52)

Reflection

Questions

Q1

I was right initially, but I was somehow convinced by Nicholas Ramos that I was wrong, when I was in fact very right.

Q2

Again, Nicholas Ramos made me rethink my answer and I made a silly blunder when I had the right answer within my grasp.

Q7

Wrong because I forgot to look at the actual return statement, which prints out the value of the substring rather than printing out 1 when true.

Q12

I didn’t fully read the students.set(), because I thouhgt it was printing out Alex first, then the students after, but it is reversed instead.

Q15

Wrong because I initially forgot to take into account the starting of count at 0, even though that is typical of code. I instead thought of the first index as 1, and it screwed up the whole problem from there, so the correct answer is E

Q16

I genuinely just miscounted the a’s in the words, simple fix

Q20

I misread the > as a <, which made me think it was saying whenever j+k is greater then is adds a value, but it is the opposite that whenever j+k is less than it adds,

Q23

It isnt C because the .size()-1 for this case shouldnt be applies to the sizeOfList because that is the one getting looped in the for loop, on the k should get the -1

Q24

I thought it was an out of bounds exception because I thought the +2 would go to 6 and it would not be within the bounds, but turns out it stops before the 5th iteration because it is < and -1, making the answer C

Q25

In this question I was partially right, because I understood the algorithm, but didn’t realize that whenever the list added and deleted elements, it would loop through the new list instead of the old one, which messed me up.

Q29

I have no idea how I got this wrong, because it is very easy, I must have been tired since I did this quiz very late at night. The mistake was that everything was printed, not just the stuff in quotes.

Q35

I got this wrong because I didn’t realize it printed just the index and not the value itself, which is a careless mistake

Q43

For some reason I thought howFar was the size of the string, rather than the clearly obvious word.length(), which made me impulsively clicky click the out of bounds, when the correct answer is C

Q44

This one I got wrong, because I didnt realize it took the shortest one out of all 3 values, I think I may have guessed on this one. But D is correct because it takes the shortest of the values until it reaches the 4th index where it can only pick the 4th option

Q45

I thought for some reason this one added both j and k values to the sm, but it just checks which one of the indexes are greater or less than the j value.

Q48

For some reason I guess that I forgot valueList didn’t need to be called again if its defined within the variable, which is why I thought 3 was wrong, but it is right and makes D correct.

Q50

I just glossed over the fact that it printed the same k value for the j value, which makes it the second term in the second row, not the second row first term etc etc.

Q52

I tried to understand this one, but I was tired and it was the last one so I just guessed on this one, The answer is E because every time the value of val % 2 is 1, then it changes the original 0 to a X, but it stops after the 4th one because the loop stops.

Takeaways

I need to focus more, and carefully pay attention to the tiny details within the for loops of a problem, especially when the problems are simple.