this is five lists: [[0, 0, 0, 1], [1, None, 0, 1], [0, 1, 1, 1], [1, 1, 1, 1]] this copies one list cluster[:] meaning that the other four are still the same ones
if the tests are showing the list after having allowed you to mutate it then that's not great because it can cause confusing messages that don't add up. buut you're also somewhat deserving of confusion if doing mutation where mutation isn't explicitly what is asked for.
It might be an issue with my code, but one of the fixed tests (total failure) says that the input is different from the real input.
printing cluster at the beginning:
[[0, 0, 0, 1], [None, None, None, None], [0, 1, 1, 1], [1, 0, 1, 1]]
the test says:
"For input: [[0, 0, 0, 1], [1, None, 0, 1], [0, 1, 1, 1], [1, 1, 1, 1]]: "
I just create a copy of the cluster and operate on it (r = cluster[:]).
Hi All,can anyone help me to understand ,how the rules are working...like in second test case whien Alice -->"send",Bob-->"lend",Alice--->"rend",then I can't find any rhyming word in Bob list but test said Bob wins?I struggling to find the rule of this game?Thanks in Adv.
So, I'm not sure why you think bob whould win and that the expected result should be -1 other than it is possible you may be reading the feedback off-by-one (the log appears above the test result).
this is five lists:
[[0, 0, 0, 1], [1, None, 0, 1], [0, 1, 1, 1], [1, 1, 1, 1]]
this copies one list
cluster[:]
meaning that the other four are still the same ones
if the tests are showing the list after having allowed you to mutate it then that's not great because it can cause confusing messages that don't add up. buut you're also somewhat deserving of confusion if doing mutation where mutation isn't explicitly what is asked for.
It might be an issue with my code, but one of the fixed tests (total failure) says that the input is different from the real input.
printing cluster at the beginning:
[[0, 0, 0, 1], [None, None, None, None], [0, 1, 1, 1], [1, 0, 1, 1]]
the test says:
"For input: [[0, 0, 0, 1], [1, None, 0, 1], [0, 1, 1, 1], [1, 1, 1, 1]]: "
I just create a copy of the cluster and operate on it (r = cluster[:]).
Thanks
the "different" should really be bolded or italicized. Preferably both..
Besides,
tttt
contains four differentt
s and, therefore, four different letters.unique would be a better word, IMO.
dear god..
I made same misstake, e.g.missed the specification
"a valid response word must contain four different letters"
tent contains two t and is therefore an invalid answer.
I made same misstake :)
e.g.missed the specification
"a valid response word must contain four different letters"
nett contains two t and is therefore an invalid answer.
Python:
got
But Bob has
'tent'
.JS, generated tests:
But Bob has
'nett'
in his memory.And Mutations seems like a fun game to play irl :D
In the 2nd sample test case:
Rhyming is not part of this kata, instead of that idea, the words must have three out of four letters matching.
Hi All,can anyone help me to understand ,how the rules are working...like in second test case whien Alice -->"send",Bob-->"lend",Alice--->"rend",then I can't find any rhyming word in Bob list but test said Bob wins?I struggling to find the rule of this game?Thanks in Adv.
Hi, I ran the kata reference solution against the case you've presented and this is the outcome:
So, I'm not sure why you think
bob
whould win and that the expected result should be-1
other than it is possible you may be reading the feedback off-by-one (the log appears above the test result).If I understand correctly, I believe this is one of the rules:
'this word cannot have already been used during the game'
Please let me know if I understood your question.
Loading more items...