我制作的程序有点麻烦。我让它显示钻石,但我有一个问题,这是我的代码:
a = input("Enter width: ")
a = int(a)
b = a
for i in range(a):
i = i + 1
b = a - i
text = " " * b + " " + "* " * i
print(text[:-1])
for i in range(a):
i = i + 1
b = a - i
text = " " * i + " " + "* " * b
print(text[:-1])
感谢所有的帮助!这就是答案