A.
n=int(input("请输入一个奇数:")) for i in range(1,n+1,2): b=n//2-(i//2+1)+1 print(" "*b,end='') print("*"*i,end='\n') for i in range(n,0,-2): b=n//2-(i//2+1)+1 print(" "*b,end='') print("*"*i,end='\n')
B.
n=int(input("请输入一个奇数:")) for i in range(1,n+1): b=n//2-(i//2+1)+1 print(" "*b,end='') print("*"*i,end='\n') for i in range(n,0): b=n//2-(i//2+1)+1 print(" "*b,end='') print("*"*i,end='\n')
C.
n=int(input("请输入一个奇数:")) for i in range(1,n+1,2): b=n//2-(i//2+1) print(" "*b,end='') print("*"*i,end='\n') for i in range(n,0,-2): b=n//2-(i//2+1) print(" "*b,end='') print("*"*i,end='\n')
D.
n=int(input("请输入一个奇数:")) for i in range(1,n+1,2): b=n-(i//2+1)+1 print(" "*b,end='') print("*"*i,end='\n') for i in range(n,0,-2): b=n-(i//2+1)+1 print(" "*b,end='') print("*"*i,end='\n')