Python Forum
help needed for a friend! :)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help needed for a friend! :)
#3
Here's one problem. On line five, the variable row is set as a string. On line 103, flip is called with row as one of it’s arguments.

def flip(board, row, col, player, playerOpposite):
   while(row<len(board)-2 or col!=0):
In flip () on line 293 row is tested to be less than len(board) producing the error:

Error:
TypeError: '<' not supported between instances of 'str' and 'int'
Because you're testing the string row against the integer len(board).
Reply


Messages In This Thread
help needed for a friend! :) - by Powell123 - Apr-30-2021, 04:07 PM
RE: help needed for a friend! :) - by Powell123 - Apr-30-2021, 05:31 PM
RE: help needed for a friend! :) - by BashBedlam - May-03-2021, 02:45 PM
RE: help needed for a friend! :) - by Powell123 - May-05-2021, 02:42 PM
RE: help needed for a friend! :) - by Powell123 - May-05-2021, 08:27 PM
RE: help needed for a friend! :) - by GOTO10 - May-06-2021, 12:24 PM
RE: help needed for a friend! :) - by jefsummers - May-06-2021, 03:47 PM
RE: help needed for a friend! :) - by Powell123 - May-06-2021, 08:13 PM
RE: help needed for a friend! :) - by jefsummers - May-06-2021, 10:43 PM
RE: help needed for a friend! :) - by Powell123 - May-08-2021, 02:02 PM
RE: help needed for a friend! :) - by Powell123 - May-08-2021, 07:17 PM
RE: help needed for a friend! :) - by jefsummers - May-09-2021, 11:36 AM
RE: help needed for a friend! :) - by Powell123 - May-10-2021, 09:07 AM
RE: help needed for a friend! :) - by jefsummers - May-10-2021, 11:44 AM

Forum Jump:

User Panel Messages

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