#๐ My assignment is due tomorrow, really need help to finish it (will pay)
17 messages ยท Page 1 of 1 (latest)
@timid notch
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
This are the remaining sections i have left:
4.8 add piece(board: list[str], piece: str, column index: int) -> bool
Adds the specified piece to the column at the given column index (0-indexed) of the given
board according to the game rules. The piece will be added to the topmost available space in
the requested column. If the requested column is full, then a piece is not added and a message
is displayed to the user as described in Table 2. This function should return True if a piece was
able to be added to the board, and False otherwise. Note that this function mutates the given
board and does not return a new board state.
A precondition to this function is that the specified board will contain exactly 8 strings each with
exactly 8 characters, and represent a valid game state. Another precondition to this function is
that the specified column index will be between 0 and 7 inclusive. The last precondition to this
function is that the given piece will be exactly one character in length.
Example:
board = ['--------', '----OOOO', 'XXXXXXXX', '--------', '------XO',
'--------', '---XXOXO', '--------']add_piece(board, "X", 1)
True
board
['--------', '---XOOOO', 'XXXXXXXX', '--------', '------XO', '--------',
'---XXOXO', '--------']
add_piece(board, "O", 2)
You can't add a piece to a full column!
False
board
['--------', '---XOOOO', 'XXXXXXXX', '--------', '------XO', '--------',
'---XXOXO', '--------']
add_piece(board, "e", 1)
True
board
['--------', '--eXOOOO', 'XXXXXXXX', '--------', '------XO', '--------',
'---XXOXO', '--------']
We can't help with this
!rule paid
!rule-8
BRUH
!rule 8
8. Do not help with ongoing exams. When helping with homework, help people learn how to do the assignment without doing it for them.
oh ๐ฆ
probably should have left out the details of the needed code and just asked how to do the code lmao
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.