不会在for循环中套用while循环
首先我的思路是分为上下两部分进行
目前最主要的问题是,并不知道上部分的右边对称怎么弄出来
Write a program to print a diamond made up of left-and right-aligned right-angled isosceles triangles, all of positive integer height specified by the user's keyboard input (a positive integer), as follows:
Enter triangle height: 6
************
***** *****
**** ****
*** ***
** **
* *
** **
*** ***
**** ****
***** *****
************
图没发出来啊
for循环中套用while循环
for i in range(1,n):
while(true):
xxxx
上半部分
a = int(input())
b = a
c = a
for i in range(6):
for j in range(6-i):
print('*',end='')
for j in range(2*i):
print(' ',end='')
for j in range(6-i):
print('*',end='')
print()
请问截图呢,而且初看你这个问题不难解决,自己找找资料也很好解决的吧
您好,我是有问必答小助手,您的问题已经有小伙伴帮您解答,感谢您对有问必答的支持与关注!