Skip to content

Feature/travelling salesman #12494

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add butterfly pattern implementation
  • Loading branch information
aydinomer00 committed Jan 2, 2025
commit d8a717920953520bd5fa3a5d304b0f34bd31a24b
4 changes: 2 additions & 2 deletions graphics/butterfly_pattern.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
def butterfly_pattern(n):

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide return type hint for the function: butterfly_pattern. If the function does not return a value, please provide the type hint as: def function() -> None:

As there is no test file in this pull request nor any test function or class in the file graphics/butterfly_pattern.py, please provide doctest for the function butterfly_pattern

Please provide descriptive name for the parameter: n

Please provide type hint for the parameter: n

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide return type hint for the function: butterfly_pattern. If the function does not return a value, please provide the type hint as: def function() -> None:

As there is no test file in this pull request nor any test function or class in the file graphics/butterfly_pattern.py, please provide doctest for the function butterfly_pattern

Please provide descriptive name for the parameter: n

Please provide type hint for the parameter: n

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide return type hint for the function: butterfly_pattern. If the function does not return a value, please provide the type hint as: def function() -> None:

As there is no test file in this pull request nor any test function or class in the file graphics/butterfly_pattern.py, please provide doctest for the function butterfly_pattern

Please provide descriptive name for the parameter: n

Please provide type hint for the parameter: n

# Üst kısım
# Upper part
for i in range(1, n + 1):
print("*" * i, end="")
print(" " * (2 * (n - i)), end="")
print("*" * i)

# Alt kısım
# Lower part
for i in range(n-1, 0, -1):
print("*" * i, end="")
print(" " * (2 * (n - i)), end="")
print("*" * i)

n = int(input("Enter the size: "))
Expand Down
Loading