So I'm actually supposed to get a design as following:
------------.|.------------
---------.|..|..|.---------
------.|..|..|..|..|.------
---.|..|..|..|..|..|..|.---
----------WELCOME----------
---.|..|..|..|..|..|..|.---
------.|..|..|..|..|.------
---------.|..|..|.---------
------------.|.------------
which it's an N*M
mat size. where N is an odd number and M is 3*N
. for which I wrote this:
N,M=map(int,input().split())
for i in range(1,N,2):
pattern=".|."*i
var=pattern.center((m-len(pattern))/2,"-")
print(var)
and when I execute this I don't get "-" for every line. I want to know where did I go wrong. I know that there's much more to do apart from this but can anyone please help me with this.
Aucun commentaire:
Enregistrer un commentaire