In the instructions, there's a duplication of Test case samples.
This needs to clearly communicate what four 5's do, in Test Case form. Test.assert_equals( score([5, 3, 5, 5, 5]), 550 )
Test.assert_equals( score([5, 3, 5, 5, 5]), 550 )
I can pass the final submission test cases even if I return 500 with four 5's but it should be 550.
Same with Ruby, assertEquals is used, instead of assert_equals.
assertEquals
assert_equals
I just finished the Ruby version, the test cases are failing now probably because assertEquals is now assert_equals.
I keep forgetting that nil is false, so I keep using arithmetic operators... D:
TIL gsub could do blocks...
+1 because you didn't need a hash like we did. heh
Mindblowing! The simplicity of this code makes it seem like Array#shift was made for this exact problem.
The simplicity had me laughing. Good one. No need to assign to x though.
Loading collection data...
In the instructions, there's a duplication of Test case samples.
This needs to clearly communicate what four 5's do, in Test Case form.
Test.assert_equals( score([5, 3, 5, 5, 5]), 550 )
I can pass the final submission test cases even if I return 500 with four 5's but it should be 550.
Same with Ruby,
assertEquals
is used, instead ofassert_equals
.I just finished the Ruby version, the test cases are failing now probably because assertEquals is now assert_equals.
I keep forgetting that nil is false, so I keep using arithmetic operators... D:
TIL gsub could do blocks...
+1 because you didn't need a hash like we did. heh
Mindblowing! The simplicity of this code makes it seem like Array#shift was made for this exact problem.
The simplicity had me laughing. Good one.
No need to assign to x though.