Font size
WorksheetsJavaScript Test 1: Shapes and Printing
Total questions: 10
Worksheet time: 8mins
How do you create a ellipse or a circle?
circle(w, h);
ellipse(x, y, w, h);
ellipse(w, h, x, y);
circle(w, h, x, y);
Make a Square. rect(100, 100, 200, ?);
(Please write number in number form.)
(a)
Which ones can make shapes.
triangle(x1, y1, x2, y2, x3, y3);
rectangle(x, y, w, h,);
oval(x, y, w, h);
ellipse(x, y, w, h);
Which line of code could be used to make this image.
rectangle(20, 20, 150, 100);
rect(20, 20, 20, 20)
rect(20, 20, 150, 100);
ellipse(20, 20, 150, 100);
Which one could print a string called "35."
print(3+5);
print("3+5");
print("3"+"5");
print("35");
Print out the number or string called 255.
(a)
Which one can make a text called "My name is cool."
text(x, y, "My name is cool.");
message("My name is cool." x, y);
text("My name is cool." x, y);
message("My name is cool." x, y);
Make the background black.
(a)
How many parameters are required to make a text or string.
1
4
2
3
Print "Is this is String?"
(a)
