diff --git a/main.py b/main.py index 4c0c135f61696bcf42c375ca5ab62aa5b105afc8..8c7e7335248b6ffbcff7c407b979508e53b5cfd7 100644 --- a/main.py +++ b/main.py @@ -1 +1,10 @@ -print('欢迎来到 InsCode') \ No newline at end of file +print('欢迎来到 InsCode') +def tri1(sym,row): + for i in range(1,row+1): + print(sym*i) +def tri2(sym,row): + for i in range(1,row+1): + print(' '*(row-i)+(sym+' ')*i) + +tri1('*',6) +tri2('*',6) \ No newline at end of file