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 14:50
Drag each label to the correct location on the image list the do’s and don’ts of safeguarding your password. a. keep yourself logged in when you leave your computer.b. don’t write your password down and leave it where others can find it.c. share your password with your friends.d.each time you visit a website,retain the cookies on your computer.e. use a long password with mixed characters.1. do's 2. don'ts
Answers: 2
question
Computers and Technology, 22.06.2019 19:20
Write a program that prompts the user to input a string. the program then uses the function substr to remove all the vowels from the string. for example, if str = "there", then after removing all the vowels, str = "thr". after removing all the vowels, output the string. your program must contain a function to remove all the vowels and a function to determine whether a character is a vowel.
Answers: 2
question
Computers and Technology, 22.06.2019 23:50
List a few alternative options and input and output over the standerd keyboard and monitor. explain their functioning in details.
Answers: 2
question
Computers and Technology, 23.06.2019 00:00
How do we use the sumif formula (when dealing with different formats) ?
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
Mathematics, 13.07.2021 23:30
question
Mathematics, 13.07.2021 23:30
question
Mathematics, 13.07.2021 23:30
Questions on the website: 13722367