Skip to content

Instantly share code, notes, and snippets.

@harrisonmalone
Created September 23, 2018 12:33
Show Gist options
  • Save harrisonmalone/17be9d062ae72c7e9c61845deac2ba52 to your computer and use it in GitHub Desktop.
Save harrisonmalone/17be9d062ae72c7e9c61845deac2ba52 to your computer and use it in GitHub Desktop.

Thomas Q2

we just need to go through the test with him and ensure that in future he puts down some kind of answer to get at least a few marks per question

perhaps we should have suggested this to everyone before the test started say something like

if you put down any answer to questions you're unsure of more likely than not you'll pick up a few marks

i don't know why he'd even think to put () as a representation of an empty string

Thomas Q13

i noticed that he has trouble with doing what the question is explicitly asking for in the ruby fundamentals

if a question says pass these things in as arguments he struggles to actually do it

my_name = "Thomas"
puts my_name.reverse

do you think for this he should be getting at least 6 marks considering he might not even pass?

Yong Q10

array_of_numbers = [12, 4, 10, 6, 7, 9, 11, 23, 33]
def find_position(array, int)
      # index = int - 1 because arrays start at 0, most people wont know this, so I put it in so 
      # when someone puts 4 for example it will show the 4th value in the array and not the
      # 5th value
      index = int - 1
      puts array[index]
end

the method returns nil so that has to be at least 5 marks off

didn't actually loop through the array

i think your comments are valid for yong to take in

perhaps for a question like this we should have example code like

arr = [12, 4, 10, 6, 7, 9, 11, 23, 33]
# create method here
p find_position(arr, 9)
=> 5

Yong Q15

again a lot of his code is not quite to the point like using gets to get the books

the way that he did the final price is correct final_price = total - total * - 0.25

20 marks is about right but could maybe be more like 25-30 based on other q15 attempts that i've seen

Xian Q15

the main problem with this was the way that she passed in an empty array "[]" as an argument

the other problem is the in the sum she had

discount = price * (5/100)
=> 0

we need more like

32 - (32.0  * 5/100)
=> 30.4

maybe could we worth more like 20 marks instead of 15 considering the effort that went in

Sam Q10

problems with return in this question but not a terrible effort

def my_method (array, number)
    new_array = []
    array.each do |pipe|
        if pipe == number
            new_array.push pipe
            return true
        else
            return false
        end
    end
end
my_method [1,2,3], 2

again not doing what the question is explicitly asking for, where did it say create a new array?

big problems that i'm seeing is the use of return and not explicitly following what the question is asking for

Sam Q15

he thought the question through and deserves 10 marks

not that much else to day though

no use of

total = price - (price * 0.05)

and no use of .uniq

Diego Q15

a good use of a case statement to return the discount amount based on the number of unique books

but there is no actual reduction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment