wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Programming basics

Total questions: 15

Worksheet time: 13mins

Name
Class
Date
1.

How many basic data types are there?

a)

3

b)

4

c)

as many as you want

d)

data types?

2.

Which is the odd one out?

a)

IF

b)

WHILE

c)

FOR

d)

DO...UNTILL

3.

You want to show some code if the age is over 18, which is the correct command? (c#)

a)

IF (age < 18)

b)

IF (age >= 18)

c)

IF age > 18

d)

IF (age > "18")

e)

IF (age > 18)

4.

This is an array of 6 elements, called scores, which is the correct reference to access the element with -16 in it.

a)

scores[-16]

b)

scores[3]

c)

scores[4]

d)

scores(5)

5.

You need an variable to act as a counter, what would be the best data type to use?

a)

Real/Float

b)

Integer

c)

String

d)

Bool

6.

You are looking for a specific card in a deck of cards, which of the standard algorithms will you use?

a)

Quick search

b)

Binary search

c)

Bubble search

d)

Linear search

7.

i++; is the same as writing:

a)

i = i +1;

b)

i = i * i;

c)

i = i - 1;

d)

GOTOWHILE;

8.

What sort of datatype would you use to store someones name?

a)

String

b)

Int

c)

float

d)

bool

9.

You have been given a problem to write the code for, what do you do?

a)

Use computational thinking to abstract the relevant information, decompose the problem, look for patterns and then design the algorithm.

b)

Go wibble wibble wibble, this is too hard, someone do it for me!!

c)

Have a quick read of the problem, and then code bash a solution out.

d)

look blankly at the teacher, blink a few times, and then turn back to your friend and continue the conversation.

10.

What do you think this bit of Python code does?

a)

Ah-Ha! Its a sort algorithm

b)

I'm not fooled by your tricks, its a search algorithm

c)

I know its a security protocol program

d)

Netcode!

11.

You have a tutorial session, should you attend it?

a)

Nah, we never do anything useful

b)

If i can be bothered

c)

Maybe, see how i feel.

d)

yes.

12.

what will x and y equal?

a)

X is 6, y is 42

b)

X is 42, y is 42

c)

x is 125, y is 100

d)

x is 25, y is 25

13.

Quizziz are better than Kahoots?

a)

sure are

b)

Most definitely

c)

Kahoot? bah we don't want those.

d)

I never want to do Kahoots ever again!!!

e)

No Kahoots are better!!

14.

Test data falling outside the expected range is called?

a)

Normal test data

b)

Abnormal test data

c)

extreme test data

15.

How often should you comment your code?

a)

comment code??

b)

every line

c)

enough that its clear what a section of code should be doing