diff --git a/Python/Designer Door Mat/README.md b/Python/Designer Door Mat/README.md new file mode 100644 index 0000000..c9ee143 --- /dev/null +++ b/Python/Designer Door Mat/README.md @@ -0,0 +1 @@ +![alt text](image.png) \ No newline at end of file diff --git a/Python/Designer Door Mat/image.png b/Python/Designer Door Mat/image.png new file mode 100644 index 0000000..99817b3 Binary files /dev/null and b/Python/Designer Door Mat/image.png differ diff --git a/Python/Designer Door Mat/solution.py b/Python/Designer Door Mat/solution.py new file mode 100644 index 0000000..f993b82 --- /dev/null +++ b/Python/Designer Door Mat/solution.py @@ -0,0 +1,14 @@ +# Enter your code here. Read input from STDIN. Print output to STDOUT +n,m=map(int,input().split()) +mid=n//2 +des='.|.' +cnt=1 +for i in range(n): + if i==mid: + print('WELCOME'.center(m, '-')) + else: + print((des*cnt).center(m, '-')) + if i) \ No newline at end of file diff --git a/Python/Text_Wrap/Screenshot 2024-02-04 062720.png b/Python/Text_Wrap/Screenshot 2024-02-04 062720.png new file mode 100644 index 0000000..acffab3 Binary files /dev/null and b/Python/Text_Wrap/Screenshot 2024-02-04 062720.png differ diff --git a/Python/Text_Wrap/solution.py b/Python/Text_Wrap/solution.py new file mode 100644 index 0000000..c003e9b --- /dev/null +++ b/Python/Text_Wrap/solution.py @@ -0,0 +1,9 @@ +import textwrap + +def wrap(string, max_width): + return textwrap.fill(text=string, width=max_width) + +if __name__ == '__main__': + string, max_width = input(), int(input()) + result = wrap(string, max_width) + print(result) \ No newline at end of file