Question: Write a function that draws horizontal lines on the graphics canvas. If a line is horizontal, then the y - values for the endpoints are

Write a function that draws horizontal lines on the graphics canvas. If a line is horizontal, then the y-values for the endpoints are the same. The parameters to your function should be the y location and the length. All of your lines should start at x position 0. Your function must be named horizontal line For example if you call: horizontal line(100,200); you should get a horizontal line of length 200 starting at position (0,100) and going to position (200,100). To draw a line, you will use the Line function that is similar to how we draw circles and rectangles. Use the examples in Docs tab to help out. If you call the following line: horizontal_line(100, horizontal line(200,200)100) horizontal line(300,20)

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!