实现一个函数,输入整数n,可以打印高度为n的等腰三角形. 样例: n = 4 ,打印的三角形为: * * * * * * * * * * * * * * * def func(n): for x in range(1,n+1): m = x * "* " print