Skip to content

Commit

Permalink
Modified the two programs
Browse files Browse the repository at this point in the history
  • Loading branch information
fharookshaik committed Oct 6, 2020
1 parent 4c99a33 commit 8723643
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Python/DesignerDoorMat.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
n,m = map(int,input().split(" "))
str = "WELCOME"
symbol = ".|."

for i in range(0,n):
if i % 2 != 0:
print((symbol*i).center(m,"-"))

print(str.center(m,"-"))

i = n-1
while i>=0:
if i % 2 != 0:
Expand Down
9 changes: 9 additions & 0 deletions Python/StringSplitAndJoin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
def split_and_join(line):
line = line.split(" ")
line = "-".join(line)
return line

if __name__ == '__main__':
line = input()
result = split_and_join(line)
print(result)

0 comments on commit 8723643

Please sign in to comment.