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, 21.06.2019 22:30
This isn’t really school related, but like where the heck can you find manga, to read to where you don’t have to pay money, for points? my friend wants me to read bj alex, and i can’t find it anywhere for free.
Answers: 2
question
Computers and Technology, 23.06.2019 15:00
Visually impaired individuals generally rely on the for navigation. thus, designers need to ensure that mouse-specific inputs, such as pointing, clicking, and hovering, can be done without a mouse.
Answers: 1
question
Computers and Technology, 23.06.2019 18:50
What is transmission control protocol/internet protocol (tcp/ip)? software that prevents direct communication between a sending and receiving computer and is used to monitor packets for security reasons a standard that specifies the format of data as well as the rules to be followed during transmission a simple network protocol that allows the transfer of files between two computers on the internet a standard internet protocol that provides the technical foundation for the public internet as well as for large numbers of private networks
Answers: 2
question
Computers and Technology, 25.06.2019 03:10
Write a program to convert a person's height in inches into centimetres #and their weight in stones into kilograms. (1 inch = 2.54 cm and 1 stone = 6.364 kg)
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
Chemistry, 17.12.2020 22:00
question
Mathematics, 17.12.2020 22:00
question
Biology, 17.12.2020 22:00
question
Mathematics, 17.12.2020 22:00