Skip to content

Fixes for issue #1024 #1167

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 1 commit 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
8 changes: 4 additions & 4 deletions graphs/directed_and_undirected_(weighted)_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def cycle_nodes(self):
for __ in self.graph[s]:
if visited.count(__[1]) > 0 and __[1] != parent and indirect_parents.count(__[1]) > 0 and not on_the_way_back:
l = len(stack) - 1
while True and l >= 0:
while l >= 0:
if stack[l] == __[1]:
anticipating_nodes.add(__[1])
break
Expand Down Expand Up @@ -210,7 +210,7 @@ def has_cycle(self):
for __ in self.graph[s]:
if visited.count(__[1]) > 0 and __[1] != parent and indirect_parents.count(__[1]) > 0 and not on_the_way_back:
l = len(stack) - 1
while True and l >= 0:
while l >= 0:
if stack[l] == __[1]:
anticipating_nodes.add(__[1])
break
Expand Down Expand Up @@ -379,7 +379,7 @@ def cycle_nodes(self):
for __ in self.graph[s]:
if visited.count(__[1]) > 0 and __[1] != parent and indirect_parents.count(__[1]) > 0 and not on_the_way_back:
l = len(stack) - 1
while True and l >= 0:
while l >= 0:
if stack[l] == __[1]:
anticipating_nodes.add(__[1])
break
Expand Down Expand Up @@ -427,7 +427,7 @@ def has_cycle(self):
for __ in self.graph[s]:
if visited.count(__[1]) > 0 and __[1] != parent and indirect_parents.count(__[1]) > 0 and not on_the_way_back:
l = len(stack) - 1
while True and l >= 0:
while l >= 0:
if stack[l] == __[1]:
anticipating_nodes.add(__[1])
break
Expand Down
2 changes: 1 addition & 1 deletion maths/factorial_python.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Python program to find the factorial of a number provided by the user."""

# change the value for a different result
NUM = 10
NUM = int(input("Enter the number: "))

# uncomment to take input from the user
# num = int(input("Enter a number: "))
Expand Down