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)

Member Avatar for masterofpuppets

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.

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.