wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

G6-L11& L12

Total questions: 15

Worksheet time: 8mins

Name
Class
Date
1.

Which is the correct?

a)

function draw()

{

}

b)

function draw()

[

]

c)

function draw{}

(

)

d)

function draw();

{

}

2.

Which one can randomly move?

a)

function draw()

{

rect(randomNumber(200,400),randomNumber(200,400));

}

b)

function draw()

{

rect(200,400);

}

c)

function draw()

{

}

rect(randomNumber(200,400),randomNumber(200,400));

d)

function draw()

{

}

rect(200,400);

3.

How can I make an animation rotate?

a)

function draw()

{

var sunny=createSprite(200,200);

sunny.setAnimation("sun");

sunny.rotation=randomNumber(0,360);

}

b)

var sunny=createSprite(200,200);

sunny.setAnimation("sun");

function draw()

{

sunny.rotation=randomNumber(0,360);

drawSprites();

}

c)

var sunny=createSprite(200,200);

sunny.setAnimation("sun");

function draw()

{

sunny.rotation+1=sunny.rotation;

drawSprites();

}

d)

var sunny=createSprite(200,200);

sunny.setAnimation("sun");

function draw()

{

sunny.rotation+1=sunny.rotation;

}

drawSprites();

4.

Which is the correct(Make the animation can move)?

a)

sprite.x=sprite.y+1;

b)

sprite.x-1=sprite.y;

c)

sprite.x-1=sprite.x

d)

sprite.x=sprite.x+2;

5.

Which group of codes is for making the animation rotate regularly?

a)

var sprite=createSprite(100,100);

sprite.setAnimation("sun");

function draw()

{

sprite.rotation=sprite.rotation+1;

drawSprites();

}

b)

var sprite=createSprite(100,100);

sprite.setAnimation("sun");

function draw()

{

sprite.rotation-1=sprite.rotation;

drawSprites();

}

c)

var sprite=createSprite(100,100);

sprite.setAnimation("sun");

function draw()

[

sprite.rotation=sprite.rotation+1;

drawSprites();

]

d)

var sprite=createSprite(100,100);

sprite.setAnimation("sun");

function draw{}

(

sprite.rotation=randomNumber(0,200);

drawSprites();

)

6.

This sprite is located at (0,400) originally. It will head to (400,0). Which following group of codes is correct.

a)

var cycle = createSprite(0, 400);

cycle.setAnimation("motorcycle");

cycle.rotation = 45;

function draw() {

background("lightgrey");

cycle.x = cycle.x + 10;

cycle.y = cycle.y -10;

drawSprites();

}

b)

var cycle = createSprite(0, 400);

cycle.setAnimation("motorcycle");

cycle.rotation = 45;

function draw() {

background("lightgrey");

cycle.x = cycle.x -10;

cycle.y = cycle.y +10;

drawSprites();

}

c)

var cycle = createSprite(0, 400);

cycle.setAnimation("motorcycle");

cycle.rotation = 45;

function draw() {

background("lightgrey");

cycle.x = cycle.x + 10;

cycle.y = cycle.y +10;

drawSprites();

}

d)

var cycle = createSprite(0, 400);

cycle.setAnimation("motorcycle");

cycle.rotation = 45;

function draw() {

background("lightgrey");

cycle.x = cycle.x -10;

cycle.y = cycle.y -10;

drawSprites();

}

7.

How can the oranage fish swim forward (to the correct side)?

a)

var orangeFish = createSprite(400, randomNumber(0, 100));

orangeFish.setAnimation("orange_fish");

function draw() {

background("navy");

orangeFish.x = orangeFish.x - 2;

drawSprites();

}

b)

var orangeFish = createSprite(400, randomNumber(0, 100));

orangeFish.setAnimation("orange_fish");

function draw() {

background("navy");

orangeFish.x = orangeFish.x +2;

drawSprites();

}

c)

var orangeFish = createSprite(400, randomNumber(0, 100));

orangeFish.setAnimation("orange_fish");

function draw() {

background("navy");

orangeFish.x+2 = orangeFish.x;

drawSprites();

}

d)

var orangeFish = createSprite(400, randomNumber(0, 100));

orangeFish.setAnimation("orange_fish");

function draw() {

background("navy");

orangeFish.x-2= orangeFish.x;

drawSprites();

}

8.

Which one is correct.

a)

draw function();

b)

draw function() {

}

c)

function draw()

{

}

d)

function draw()

{};

9.

Which code is for rotating as anti-clockwise?

a)

sprite.rotation=sprite.rotation-1;

b)

sprite.rotate=sprite.rotate-1;

c)

sprite.rotation=sprite.rotation+1;

d)

sprite.rotate-1=sprite.rotate;

10.

Which group of codes can make this mouse move?

(Animation name is mouse.)

a)

var mouse = createSprite(50, 50);

mouse.setAnimation("mouse");

mouse.scale = 0.5;

function draw() {

background("lightgreen");

mouse.y = mouse.y + 2;

drawSprites();

}

b)

var mouse = createSprite(50, 50);

mouse.setAnimation("mouse");

mouse.scale = 0.5;

mouse.y = mouse.y + 2;

function draw() {

background("lightgreen");

drawSprites();

}

c)

var mouse = createSprite(50, 50);

mouse.setAnimation("mouse");

mouse.scale = 0.5;

mouse.y-1 = mouse.y;

function draw() {

background("lightgreen");

drawSprites();

}

d)

var mouse = createSprite(50, 50);

mouse.setAnimation("mouse");

function draw() {

background("lightgreen");

mouse.scale+1 = mouse.scale;

mouse.y-1 = mouse.y;

drawSprites();

}

11.

Which one is correct?

a)

function draw()

{

if(sprite.x>0)

{

sprite.x+1=sprite.x;

}

drawSprites();

}

b)

function draw(if(sprite.x>0)

)

{

{sprite.x=sprite.x+1;}

drawSprites();

}

c)

function draw()

{

if(sprite.x>0)

{

sprite.x=sprite.x+1;

}

drawSprites();

}

d)

function draw()

{

if(sprite.x>0)

{

sprite.x=sprite.x+1;

}

}

drawSprites();

12.

Which code structure is correct:

a)

if( conditions)

{

results

}

b)

if( )

{

conditions and results

}

c)

if( conditions and results)

{

}

d)

if( results)

{

conditions

}

13.

If we want the melon to roll back, which of the following codes is correct?

a)

var melon=createSprite(0,200);

melon.setAnimation("m.png_1");

melon.tint=255;

function draw() {

background("lightblue");

melon.x=melon.x+1;

melon.rotation=melon.rotation+10;

if (melon.x>400)

{

melon.x=0;

}

drawSprites();

}

b)

var melon=createSprite(0,200);

melon.setAnimation("m.png_1");

melon.tint=255;

function draw() {

background("lightblue");

melon.x=melon.x+1;

melon.rotation=melon.rotation+10;

if (x>400)

{

x=0;

}

drawSprites();

}

c)

var melon=createSprite(0,200);

melon.setAnimation("m.png_1");

melon.tint=255;

function draw() {

background("lightblue");

melon.x=melon.x+1;

melon.rotation=melon.rotation+10;

if (x<400)

{

x=0;

}

drawSprites();

}

d)

var melon=createSprite(0,200);

melon.setAnimation("m.png_1");

melon.tint=255;

function draw() {

background("lightblue");

melon.x=melon.x+1;

melon.rotation=melon.rotation+10;

if (sprite.x<400)

{

sprite.x=0;

}

drawSprites();

}

14.

If we want the melon to roll towards the ocean when it reappears after going off the screen, which code is correct?

a)

b)

c)

d)

15.

What is the result of running?

a)

1. When the melon walks out of the screen, it will come back.

2. When the melon's horizontal coordinate is equal to 400, it will enter the sea.

3. When the melon's horizontal coordinate is equal to 50, it will return to the land.

b)

1. When the melon walks out of the screen, it will NOT

come back.

2. When the melon's horizontal coordinate is equal to 400, it will enter the sea.

3. When the melon's horizontal coordinate is equal to 50, it will return to the land.

c)

1. When the melon walks out of the screen, it will come back.

2. When the melon's horizontal coordinate is greater than 400, it will enter the sea.

3. When the melon's horizontal coordinate is smaller than 50, it will return to the land.

d)

1. When the melon walks out of the screen, it will NOT come back.

2. When the melon's horizontal coordinate is greater than 400, it will enter the sea.

3. When the melon's horizontal coordinate is smaller than 50, it will return to the land.