Uh oh!
There was an error while loading. Please reload this page.
[UPDATED]rat_in_maze.py - #9087
Conversation
rohan472000
commented
Sep 25, 2023
Kindly tick the checkboxes while raising PR, don't delete them. |
Muhammadummerr
commented
Sep 25, 2023
Ok, but now how to tick checkboxes when PR is raised? |
rohan472000
commented
Sep 25, 2023
Replace |
Muhammadummerr
commented
Sep 25, 2023
Sorry, but where? |
While creating PR, you will get a box to describe the change, below in the box there are multiple checkboxes to tick. https://github.com/TheAlgorithms/Python/blob/master/.github/pull_request_template.md |
Muhammadummerr
commented
Sep 25, 2023
should I delete this PR now, and create another one and tick checkboxes? |
rohan472000
commented
Sep 25, 2023
No...copy from that link which I provided, and paste it in description box above, then tick required checkboxes. |
rohan472000
commented
Sep 25, 2023
Also revise the PR title, don't include 9066, this should be in description box, see contributing guidelines beforehand. |
Muhammadummerr
commented
Sep 25, 2023
Thanks a lot, your guidance meant a lot to me:) |
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: dlesnoff <54949944+dlesnoff@users.noreply.github.com>
Muhammadummerr
left a comment
There was a problem hiding this comment.
thanks for the correction.
dlesnoff
commented
Sep 27, 2023
I am not familiar with the Python repository, but I think that you should reflect the changes in the unittest. |
[UPDATED] rat_in_maze.py
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
rohan472000
commented
Sep 29, 2023
At line 19, a lack of a blank line after >>>: '>>>>>>> origin/new_branch' is given in error but text '>>>>>>> origin/new_branch' doesn't appear to be related to the code or docstring. I have suggested change, commit that and see if it resolves the issue or not. |
Co-authored-by: Rohan Anand <96521078+rohan472000@users.noreply.github.com>
rohan472000
commented
Sep 29, 2023
|
rohan472000
commented
Sep 29, 2023
Use |
Muhammadummerr
commented
Sep 29, 2023
3 errors found ,then how should I resolve them without using ruff --fix . |
rohan472000
commented
Sep 29, 2023
run : |
Muhammadummerr
commented
Sep 29, 2023
still 3 errors found |
Muhammadummerr
commented
Sep 29, 2023
using black . showing All done but ruff . --fix showing 3 erros found |
Muhammadummerr
commented
Sep 29, 2023
I understand what the problem is. The output of solve_maze is a 2D array written in the docstring as [[0, 1, 1], [0, 0, 1], [0, 0, 1]], but it exceeds the 88-character word limit. Now, when I format the line, the expected output does not match the obtained output. Can you help me in how to approach this issue now? |
Uh oh!
There was an error while loading. Please reload this page.
rohan472000
left a comment
There was a problem hiding this comment.
Remove print statement as it is returning None.
| size = len(maze) | ||
| # Check if source and destination coordinates are Invalid. | ||
| if not (0 <= source_row <= size - 1 and 0 <= source_column <= size - 1): | ||
| print("Invalid source coordinates") |
There was a problem hiding this comment.
| print("Invalid source coordinates") | |
| print("Invalid source coordinates") | ||
| return None | ||
| elif not (0 <= destination_row <= size - 1 and 0 <= destination_column <= size - 1): | ||
| print("Invalid destination coordinates") |
There was a problem hiding this comment.
| print("Invalid destination coordinates") | |
| print("\n".join(str(row) for row in solutions)) | ||
| return solutions | ||
| else: | ||
| print("No solution exists!") |
There was a problem hiding this comment.
| print("No solution exists!") | |
tianyizheng02
commented
Sep 30, 2023
Thank you for your contribution, but unfortunately we're not accepting new PRs at the moment. We're currently trying to clear our backlog of existing PRs in preparation for Hacktoberfest. If you want to contribute, please wait until after October 1 to do so. See this discussion for more info. |
The '>>>>>>>' and '======' stuff comes from the git merge. When there is a conflict (a file being changed in the two original branches),
|
Describe your change:
FIXES#9066
I have made updates to the rat_in_maze.py file to enhance code clarity.
These updates include:
1.Adding more descriptive comments to explain the logic and steps of the maze-solving algorithm.
2.Introducing variables that allow for easy customization of the source and destination cells within the maze.
3.Refactor path representation in solution:
Checklist: