Skip to content

Backtracking/rat maze #9159

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backtracking/rat_in_maze.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ def solve_maze(maze: list[list[int]]) -> bool:
solutions = [[0 for _ in range(size)] for _ in range(size)]
solved = run_maze(maze, 0, 0, solutions)
if solved:
print("\n".join(str(row) for row in solutions))
print((solutions, 1))
else:
print("No solution exists!")
print(([], 0))
return solved


Expand Down
2 changes: 1 addition & 1 deletion web_programming/reddit.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_subreddit_data(
headers={"User-agent": "A random string"},
)
if response.status_code == 429:
raise requests.HTTPError
raise requests.HTTPError(response=response)

data = response.json()
if not wanted_data:
Expand Down