BC102 带空格直角三角形图案

思路:

step1:先输出空格;在输出✳和空格;

代码如下:

while True:
    try:
        n = int(input())
        i = 1
        while i <= n:
            j = 0
            while j < n:
                if i+j >= n:
                    print('* ',end='')
                else:
                    print('  ',end='')
                j += 1
            print()
            i += 1
    except:
        break