Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Validation checking
#24
Don't test 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
Reply


Messages In This Thread
Validation checking - by Help_me_Please - Aug-14-2019, 01:31 PM
RE: Validation checking - by buran - Aug-14-2019, 01:35 PM
RE: Validation checking - by perfringo - Aug-14-2019, 01:39 PM
RE: Validation checking - by Help_me_Please - Aug-14-2019, 01:43 PM
RE: Validation checking - by perfringo - Aug-14-2019, 01:52 PM
RE: Validation checking - by Help_me_Please - Aug-14-2019, 03:41 PM
RE: Validation checking - by perfringo - Aug-14-2019, 07:55 PM
RE: Validation checking - by ichabod801 - Aug-14-2019, 05:01 PM
RE: Validation checking - by jefsummers - Aug-14-2019, 06:39 PM
RE: Validation checking - by Help_me_Please - Aug-15-2019, 02:17 PM
RE: Validation checking - by ichabod801 - Aug-15-2019, 03:06 PM
RE: Validation checking - by Help_me_Please - Aug-15-2019, 03:33 PM
RE: Validation checking - by ichabod801 - Aug-15-2019, 03:36 PM
RE: Validation checking - by Help_me_Please - Aug-15-2019, 04:03 PM
RE: Validation checking - by buran - Aug-15-2019, 04:51 PM
RE: Validation checking - by ichabod801 - Aug-15-2019, 04:54 PM
RE: Validation checking - by Help_me_Please - Aug-16-2019, 09:40 AM
RE: Validation checking - by perfringo - Aug-16-2019, 10:17 AM
RE: Validation checking - by jefsummers - Aug-16-2019, 11:46 AM
RE: Validation checking - by perfringo - Aug-16-2019, 12:11 PM
RE: Validation checking - by ichabod801 - Aug-16-2019, 12:33 PM
RE: Validation checking - by Help_me_Please - Aug-16-2019, 12:46 PM
RE: Validation checking - by jefsummers - Aug-16-2019, 02:18 PM
RE: Help please stuck with summer work - by nilamo - Aug-15-2019, 04:47 PM
Connect 4 - by Help_me_Please - Aug-16-2019, 11:38 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020