当前位置:网站首页>[weekly pit] output triangle

[weekly pit] output triangle

2022-07-06 20:19:00 Crossin's programming classroom

Zero basis python Introductory tutorial :python666.cn

Hello everyone , Welcome to Crossin Programming classroom of !

our “ Every Monday ” Here comes the column again !

Long time no see , Let's warm up with a simple topic today :

Output the following graphics on the console ( Regardless of color ):

* * * * *
*     *
*   *
* *
*

If it's too easy for you to output a fixed length , You can add an input n(n Is a positive integer and n>3), As the number of asterisks in the first row of the output triangle .

Such as input 7, The output :

* * * * * * *
*         *
*       *
*     *
*   *
* *
*

Detailed answers and reference codes will be given in the next column , You can also refer to the code in the message of other students .

I look forward to your answers , I hope you can complete the whole series .

Simple code can be submitted directly in the message , Long code is recommended  paste.ubuntu.com  or  

codeshare.io  And other code sharing sites , Just copy the code and save it , You can get a share address , Very convenient .

For past questions, click the collection at the beginning of the article “ Every Monday ” Enter the view .


_ Previous articles are recommended _

【 Every Monday 】 The archive


If you need to know Paid premium courses And Teaching Q & a service

Please be there. Crossin Programming classroom of Internal reply : 666

590ce25ee7ecd727df8cb9cd7888ef41.png

原网站

版权声明
本文为[Crossin's programming classroom]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207061223232558.html