Bug in automatic validation of Scrabble

Hi,

When I run in IDE all the test cases in scrabble (using python3) pass.
But when I am submitting the answer I fail only on the first test which have only word.
The solution isn’t hard coded, even the harder test cases pass.

Is this really a bug?
If not, what could cause it to fail?

Thanks

The bug is probably in your code. I tried to explain the difference between the IDE and validation testcases here.

Try to make and run some testcases yourself. But don’t try just anything, try to test the edge cases that might break your program.

1 Like

I tried, but there aren’t many edge cases due to the restrictions of the game.
Nothing I tried so far broke the program.
Does the automatic validation take time as parameter for testing the code? could it be performance issue?
Any way to see what the automatic validation tests?

Thanks

OK. I managed to make it work.

I used this dictionary setup:
cur_values = {‘a’:1 , ‘b’:3 , ‘c’:3 , ‘d’:2 , ‘e’:1 , ‘f’:4 , ‘g’:2 ,‘h’:4 ,‘i’:1, ‘j’:8 , ‘k’:5, ‘l’:1 ,
‘m’:3 , ‘n’:1 , ‘o’:1 , ‘p’:3 , ‘q’:10 , ‘r’:1, ‘s’:1 ,‘t’:1, ‘u’:1 , ‘v’:4 , ‘w’:4 , ‘x’:8 , ‘y’:4 , ‘z’:10}

instead of:
cur_values = {k:1 for k in ‘eaionrtsu’}
cur_values.update({k:2 for k in ‘dg’})
cur_values.update({k:3 for k in ‘bcmp’})
cur_values.update({k:4 for k in ‘fhvwy’})
cur_values.update({k:5 for k in ‘k’})
cur_values.update({k:8 for k in ‘jx’})
cur_values.update({k:10 for k in ‘qz’})

Which, if you ask me, shouldn’t fail…

and if I ask you how much is ‘l’ in your second setup?

2 Likes

you are right.
so the bug is in the human :slight_smile:

hey, there’s still a bug in validators - there’s a validator with 2 best words on inputs where u can accidentally print the wrong one and fail it, but there isn’t any test case with 2 best words, so people submit their 100% solution and don’t understand why they got only 87%
would u fix some test case so it would fail due to 2 best words? or fix the 2 best words validator (i don’t remember which one)

we’ll look into it

I just had a look.
There is a testcase with 2 best words:
10 some first potsie day could postie from have back this sopitez

1 Like