Draw a beautiful T X30822


Statement
 

pdf   zip

html

You have to program the function below.

  • Write a function drawT(width, height) that given integers numbers width and height such that width is odd and 1 ≤ width, height ≤ 9 draws a beautiful T of he appropriate size. Follow the patterns below.

Scoring

The function counts 100 points.

Sample session
>>> drawT(5, 7)
55555
  7
  7
  7
  7
  7
  7
>>> drawT(7, 6)
7777777
   6
   6
   6
   6
   6
>>> drawT(9, 1)
999999999
>>> drawT(1, 4)
1
4
4
4
>>>
Information
Author
ProAl
Language
English
Official solutions
Python
User solutions
Python