Question: write in python please Define the following functions: ' drawLine - this function exects a Turtle object and four integers as arguments. The integers represent

 write in python please Define the following functions: ' drawLine -

write in python please

Define the following functions: ' drawLine - this function exects a Turtle object and four integers as arguments. The integers represent the end-points of a line segment. The function should draw a black line segment of width I with the turtle and do no other drawing drawRectangleSimple - this function expects a Turtle object and the coordinates of the upper-left and lower-right corners of a rectangle as arguments. Each coordinate argument is a tuple containing an x. y pair drawRectangle modify the drawRectangleSimple function to take an addition RGB value for the rectangles color and an optional Boolean value named fillOn as arguments. Its default fill value is False. If the fill value is True, the function should fill the rectangle in the given ca.pr. (Hint: you can use the line width to draw the filled rectangle.) Demonstrate your program by writing a main function that: creates a Turtle with a window size of 400 by 400. draws a gray, filled rectangle with an upper-left corner at (0, 0) and a lower-right corner at (100, -175) draws a simple rectangle with an upper-left corner at (-150, 150) and a lower-right corner at (150, -150). draws a line from (150, 150) to (-200, -200)

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!