PY
py
1
2
3
4
5
6
7
8
9
def pattern(N,a=0,b=0):
c='.'
if a>N-3: c='-'
print(c*(a+b))
if a<N-1:
pattern(N,a+1,a+b)
print(c*(a+b))
pattern(7)
#https://www.sololearn.com/Discuss/850718/?ref=app
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run