subject

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, 200)
horizontal_line (200, 100)
horizontal_line (300, 20)
your canvas should look like:

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 13:30
Jane’s team is using the v-shaped model for their project. during the high-level design phase of the project, testers perform integration testing. what is the purpose of an integration test plan in the v-model of development? a. checks if the team has gathered all the requirements b. checks how the product interacts with external systems c. checks the flow of data in internal modules d. checks how the product works from the client side
Answers: 1
question
Computers and Technology, 23.06.2019 00:10
My has been slow anyone else’s ?
Answers: 1
question
Computers and Technology, 23.06.2019 10:50
Your friend kayla is starting her own business and asks you whether she should set it up as a p2p network or as a client-server network. list three questions you might ask to kayla decide which network to use and how her answers to those questions would affect your recommendation.
Answers: 2
question
Computers and Technology, 23.06.2019 15:30
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
You know the right answer?
Write a function that draws horizontal lines on the graphics canvas. If a line is horizontal, then t...
Questions
question
Social Studies, 08.10.2019 12:10
question
Geography, 08.10.2019 12:10
question
Mathematics, 08.10.2019 12:10
Questions on the website: 13722360