Ict11 (Q1)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Holy Trinity Academy of Calamba, Inc.

Brgy. Barandal, Calamba City, Laguna


Contact no. (049) 502-3785
Training the mind Shepherding the heart

FIRST QUARTERLYT IN ICT 12


S.Y. 2019 – 2020
NAME: _________________________________ Date: ________________________
Ms. Christine Ainah P. Sales Parent’s Signature ____________
I. With the following statement given, answer the question.
1. In the following code, we define two variables, w and h, and use them to draw an ellipse
and a rectangle:
var w = 20;
var h = 15;
rect(10, 10, w, h);
ellipse(10, 10, w, h);

How tall is each one of the shapes?


2. The following code draws a face with a mouth (with no eyes!), using two variables:
var faceS = 100;
var mouthS = 30;
ellipse(200, 200, faceS, faceS);
ellipse(200, 220, mouthS, mouthS);

How wide is the second ellipse that draws the mouth?


3. After running this code:
var x = 5;

What is the value of x?


4. In the following code, we define a variable and draw three shapes - a rectangle and two
ellipses:
var xPos = 55;
rect(10, 20, 30, 40);
ellipse(xPos, 20, 15, 30);
ellipse(xPos, 10, 20, 30);
At what x position are the ellipses drawn?
5. After running this code:
var x = 50;
var y = 15;
What is the value of the y variable?
6. In the following code, we define a variable and use it to draw a rectangle:
var rectWidth = 20;
rect(10, 10, rectWidth, rectWidth);

How wide is the rectangle?


7. In the following code, we define two variables, xPos and yPos, and use them to draw a
rectangle:
var xPos = 10;
var yPos = 5;
rect(xPos, yPos, 10, 10);
At what x position is the rectangle drawn?
8. We're drawing eyes for a face, and we want the eyes to both be in the same y position
and to be the same size. We use the following code to draw them:
var y = 70;
var size = 30;
ellipse(100, y, size, size);
ellipse(150, y, size, size);
At what y position are the eyes drawn?
9. In the following code, we define two variables, w and h, and use them to draw a
rectangle:
var w = 35;
var h = 50;
rect(20, 20, w, h);
rect(10, 10, w, h);

How tall is the shapes?


10. In the following code, we define a variable and draw three shapes - two ellipses:
var xPos = 25;
ellipse(xPos, 20, 15, 30);
ellipse(xPos, 10, 20, 30);

At what x position are the ellipses drawn?


11. Given the following code used in drawing rectangle:
var teethSize = 25;
rect(25, 20, 15, teethSize);
rect(25, 10, 20, teethSize);

What is the height of the teeth?


12. Supposed you are to draw a rectangle as a background with the following code:
var x = 150;
rect(x, 50, 250, 75);
At what x position is rectangle drawn?
13. with the following code, you are to draw rectangle:

var w =50
var h = 65
rect(79, 77, w, h)

How tall is the rectangle?


14. Your task is to make the sun rise at 1 pixel:
var sunSize = 50;
ellipse(sunSize, 75, 30, 30);
What should you do to make the sun rise?
15. Supposed you are to make the star fall diagonally from right to left with 2 pixels:
var xStar = 50;
var yStar = 70
image (getImage("cute/Star"), xStar, yStar, 50,100);
What should you do with the variable star?
II. Write the command needed for it to function.

Olaf's eyes are drawn as ellipses, and the var = ;


last two numbers represent their width and ellipse(170, 150,___ ,___ ); // left eye
height. Create a variable that stores the eye ellipse(230, 150,___,___ ); // right eye
size and use that to change the size of both
eyes.

“Be strong and courageous. Do not be afraid or terrified, for the Lord your God goes with
you; he will never leave you nor forsake you.”
-Deuteronomy 31:6
GOD BLESS! 

You might also like