Aug-16-2019, 12:33 PM
Don't test
When you return three values using tuple syntax, you need to assign three values using tuple syntax. Take this function:
@ perfringo: I think by four in a row he means something like Connect Four. You drop pieces into slots and they stack on top of each other. You try to get four pieces in a row, orthogonally or diagonally.
where invalid == True
, just test where invalid:
.When you return three values using tuple syntax, you need to assign three values using tuple syntax. Take this function:
def foo(): return True, 801, 'a duck'If I do
invalid = foo()
, then invalid is equal to (True, 801, 'a duck')
. What should be done is invalid, number, floats = foo()
. Then invalid is True, number is 801, and floats is 'a duck'.@ perfringo: I think by four in a row he means something like Connect Four. You drop pieces into slots and they stack on top of each other. You try to get four pieces in a row, orthogonally or diagonally.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures