Printing an ASCII diamond with set width in python

前端 未结 7 1662
Happy的楠姐
Happy的楠姐 2020-12-11 13:50

Yes, this is a homework task. But just please, if you\'re going to give me the code please tell me what you\'ve done in detail. I am extremely new to this.

So the ta

7条回答
  •  时光说笑
    2020-12-11 14:20

    You start with i = 1 and go until i > wid to make the top. To make the bottom of the diamond, you must do the reverse of what you did for the top. The code is easy, but I won't write it unless you want me to.

提交回复
热议问题