From e6ea99503ddf94dede8529d9b1ee079a6c74d5fb Mon Sep 17 00:00:00 2001 From: Mohityadav2099 <56524365+Mohityadav2099@users.noreply.github.com> Date: Tue, 15 Oct 2019 15:17:08 +0530 Subject: [PATCH] Solution to challenge 7 --- .../Mohityadav2099/Challenge7.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Challenge questions/Mohityadav2099/Challenge7.py diff --git a/Challenge questions/Mohityadav2099/Challenge7.py b/Challenge questions/Mohityadav2099/Challenge7.py new file mode 100644 index 0000000..b5c4f80 --- /dev/null +++ b/Challenge questions/Mohityadav2099/Challenge7.py @@ -0,0 +1,17 @@ +s=str(input()) +r,c=list(map(int,s.split('X'))) + +a='~' +h='#' +j=1 + +for i in range(r//2): #top half of pattern + print((a*(j)).center(c,'h')) + j=j+2 + +print(a*c) #middle row + +for i in range(r//2): #bottom half of pattern + j=j-2 + print((a*(j)).center(c,'h')) +