Rombe clapejat X16966


Statement
 

pdf   zip

Dissenya una funció motted_rhombus(n) que donat un nombre enter n>2n>2 escrigui un rombe de costat nn motejat.

L’enunciat demana que la funció escrigui quelcom, així doncs en aquest problema es farà servir print en lloc de return.

Exemple de sessió

Sample session
>>> motted_rhombus(4)
   *
  * *
 * * *
* * * *
 * * *
  * *
   *
>>> motted_rhombus(7)
      *
     * *
    * * *
   * * * *
  * * * * *
 * * * * * *
* * * * * * *
 * * * * * *
  * * * * *
   * * * *
    * * *
     * *
      *
Information
Author
InfBesos
Language
Catalan
Translator
InfBesos
Original language
Spanish
Other languages
English Spanish
Official solutions
Python
User solutions
Python