Question: Now you try! With the functions that you have learnt so far, write a function with function header: draw _ house ( height , breadth,

Now you try!
With the functions that you have learnt so far, write a function with function header:
draw_house(height, breadth, roof_base)
This function will draws a house of height (to the base of the roof) height units, of breadth breadth units
and the roof is root_base units wide. Calling draw_house (100,150,200) will result in something like the
following. It does not matter how the roof of the house looks like, but make sure your drawn house is left-
and-right symmetrical.You might have learnt some of the Python Turtle functions in lecture/tutorial. Here are a few questions to
really test your understanding of how they work, and a very simple drawing to get you acquainted with
drawing with Turtle!
Some of the functions covered are:
pd(): Pen down. Any movements thereafter will be traced
pu () : Pen up. Any movements thereafter will NOT be traced
forward (distance) : Moves the turtle forward a number of units specified by distance
backward(distance) : Moves the turtle backward a number of units specified by distance
right (degrees) : Turns the turtle right by a certain number of degrees specified
left (degrees) : Turns the turtle left by a certain number of degrees specified
(Note: the direction functions forward, backward, right and left all have shorthands, which are
fd,bk(or back), rt and lt respectively. Use any of these shorthands or full names as you prefer.)
Warmup
In the following sequences of function calls, try to imagine what will be drawn. Then, run the calls yourself
on Python. Did it draw what you had expected? (Note: This part is not graded and is only for your own
practice. There is no need to copy your answers from this part to Coursemology)
 Now you try! With the functions that you have learnt so

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!