Empty triangle X28608


Statement
 

pdf   zip

Dessign a function @empty_triangle(n)@ that given an int value n>2n>2 writes an empty triangle of height nn.

The statement asks for a function that writes something, thus in this problem print will be used instead of return.

Sample session

Sample session
>>> empty_triangle(3)
  *
 * *
*****
>>> empty_triangle(5)
    *
   * *
  *   *
 *     *
*********
Information
Author
InfBesos
Language
English
Translator
Original language
Catalan
Other languages
Catalan Spanish
Official solutions
Python
User solutions
Python