0

hi basically i have to write a function which draws 4 rectangles next to eachother(consisting of spcaes then hashes then spaces then finally hashes, all of the same height). the rectangles final The rectangles common height,and the width of the four rectangles should be parameters, e.g.(3, 0, 5, 4, 2) will output.

##### ##
##### ##
##### ##

heres my current code. the drawBlockC function is the second part of the answer.

def drawBlock(height, width):
for i in range( height ):
print width * "# "

def drawLetterC():
drawBlock(1, 7)
drawBlock(1, 7)
drawBlock(1, 2)
drawBlock(1, 2)
drawBlock(1, 7)
drawBlock(1, 7)

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by jaison2
0

hi,
I didn't quite understand the specification of the function that you want to write. :) Especially this part

the rectangles final The rectangles common height,and the width of the four rectangles should be parameters, e.g.(3, 0, 5, 4, 2) will output.

##### ##
##### ##
##### ##

Do you need only the width and height of the rectangles or is there something else as well, because you say you need 4 rectangles but the output has only 2 :)

P.S. sorry if i missed something in the spec.

Edited by masterofpuppets: n/a

0

hi,
I didn't quite understand the specification of the function that you want to write. :) Especially this part

Do you need only the width and height of the rectangles or is there something else as well, because you say you need 4 rectangles but the output has only 2 :)

P.S. sorry if i missed something in the spec.

This is just an example... we just need to create a function which can draw upto 4 rectangles.. even i dnt relly get this question thts y i am looking for help..lol

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.