wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Learn to code 2 review

Total questions: 26

Worksheet time: 13mins

Name
Class
Date
1.

How would you name a variable

a)

Var = Name

b)

Let = Name

c)

Submit

2.

An assortment of items in a given code is a ___________.

a)

index

b)

array

c)

variable

d)

parameter

3.

The number that represents the relative place of an item/Character is called an ___________.

a)

index

b)

array

c)

variable

d)

parameter

4.

What is a parameter?

a)

An integer which you need to set a relative position

b)

A Assortment of items in a given code

c)

A variable

d)

Extra information in a code that is technology transferred through a function.

5.

________________ is the act of creating a new instance of a type, which includes setting initial values for any properties of the type.

a)

Type

b)

Initialization

c)

Boolean

d)

Parameter

6.

A _______________ is a named code that contains data on how the computer is supposed to react to the code.

a)

parameter

b)

boolean

c)

variable

d)

type

7.

Is this the correct way to name a gem counter?

a)

let GemCounter = TotalGems

b)

Var gemCounter = 0

8.

How would you add on in a variable (gemCounter)

a)

gemCounter = gemCounter+1

b)

Reeeeeee

c)

SwitchCounter=switchCounter+1

9.

How would initialize expert

a)

If expert

b)

While expert

c)

Let expert=Expert()

d)

expert.

10.

Why is the key variable used?

a)

To make life easier

b)

To make our code tidy.

c)

To add on sand make coding messier

11.

_____________ is a named grouping of properties (the features) and methods (the behaviors) of a kind of data.

a)

Type

b)

Initialization

c)

Boolean

d)

Parameter

12.

What is a type similar to.

a)

Blueprint

b)

Graphic

c)

Jersey

d)

Highway.

13.

What do methods tell you in types.

a)

The name of the property

b)

The behavior of the code.

c)

How variables are named.

14.

How would you correctly write a method.

a)

.MvofORwardx

b)

.moveForward()

c)

.MoveForward

d)

Var moveForward = 0

15.

How can you draw a comparison to portals and characters

a)

Portals are type sort of like a character for example portals would be the type and green portal would be the instance and character would be the type and expert would be the instance

b)

There the same

c)

I don't know

d)

jdnwbkhefifgdhiygwert4ehwrgsyefwhygvewkfgygefwjygfewhkefwghikefhf3kufeghueghgkergbkfeighufewgefwigfeiuyefwghyefghfeyfeghykefhbgfewykgfeyfewgbfewiqfhiouefqgvefwhiohjfekewf

16.

Does a declaration statement come before or after the equal sign?

a)

A let statemnet

b)

var = gemCounter

c)

Before

d)

Let expert = Expert()

e)

After

17.

How would you write the correct parameter for moving a certain distance.

a)

move(distance : 6) {

}

b)

func move {

6 times

}

c)

While move: 6

d)

moveForward()

moveForward()

moveForward()

moveForward()

moveForward()

moveForward()

18.

Which is the correct way to solve the level where you have to put a character on each block and then world is a straight line.

a)

var rows [0,1,2,3,4,5,6]

place Characters (at :rows)

b)

var rows [0,1,2,3,4,5,6]

place Expert (at :rows)

c)

var rows [0,1,2,3,4,5,6]

place Blue (at :rows)

19.

At what number to variables usually begin at

a)

49

b)

59

c)

69

d)

0

e)

39

20.

How would you activate a green portal?

a)

greenPortal.isActive=false

b)

greenPortal.isActive=true

c)

purplePortal.isActive=false

d)

greenPortal.isActive=true

21.

How would you place a block facing South?

a)

world.place (Block(), atColum:3, row:3)

b)

world.place (Block(), facing south, atColum:3, row:3)

22.

How would you remove a block?

a)

world.place

b)

world.place(sea append.)

c)

world.removeBlock(at: coordinate)

23.

what is the vague term for an unnamed coordinate

a)

Cooordinate

b)

Coordinates

c)

Coordinate

d)

coordinate

24.

Which of the characters can jump

a)

Expert

b)

Blue

c)

Byte

d)

Piper

25.

What are the three ways to write an array.

a)

append.

b)

append

c)

world.place

d)

world.remove

26.

What is most efficient way to move forward 3 times

a)

for I in 1... 3{

moveForward()

}

b)

moveForward()

moveForward()

moveForward()

moveForward()

moveForward()

moveForward()

c)

move (distance : 6)