wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Overall programming tests

Total questions: 60

Worksheet time: 30mins

Name
Class
Date
1.
How do you write an if statement?
a)
if ()
b)
als ()
c)
else ()
d)
else if ()
2.

Which of these is a loop?

a)

if(x<10)

b)

while(x<10)

c)

var x=10;

d)

text(x,10;10)

3.

Which of the following will decrease the value of x?

a)

x--;

b)

x-1;

c)

x=x;

d)

x=-x;

4.

Which one is greater than or equal to

a)

> or =

b)

> || =

c)

>=

d)

<=

5.

When we surround a word with quotes "David" it's called ?

a)

a program

b)

a loop

c)

a string

d)

a command

6.

A short form writing the word variable is

a)

rav

b)

VAR

c)

var

d)

varia

7.

What is the value of:

”31” - 1

a)

“30”

b)

30

c)

“311”

d)

NaN

8.

JavaScript functions can access variables defined in the same scope?

a)

True

b)

False

9.

Which tag indicates the presence of javascript

a)

<css>

b)

<script type="text/javascript">

c)

<?php>

d)

<style>

10.

What other languages are typically used with JavaScript?

a)

Python

b)

Ruby

c)

HTML & CSS

d)

SQL

11.
A boolean;
a)
Expresses a true false statement
b)
can contain letters, numbers, spaces, and symbols.
c)
takes in an input, does something with it, and then returns an output.
d)
Runs a boolean (true/false) statement based on data entered
12.

What is Javascript?

a)

programming language

b)

HTML tags

c)

CSS

d)

A web page

13.

What is first index value of an array?

a)

-1

b)

0

c)

1

d)

undefine

14.

His name is Fred and he is less than 16 years old

a)

if (name = "fred" && age < 16 )

b)

if (name === "fred" && age < 16 )

c)

if (name = "fred" || age < 16 )

d)

if (name === "fred" || age < 16 )

15.

Repeat something 10 times

a)

repeat 10

b)

for (var i=0; i<10; i++)

c)

repeat { } until 10;

d)

while (i = 10)

16.

JavaScript is an ________ language.

a)

compiled

b)

interpreted

17.

Variable names cannot start with numbers.

a)

True

b)

False

18.

Which mathematical assignment is the "increment operator"?

a)

+=

b)

++

c)

--

d)

+-

19.
What character do we use for multiplication?
a)
#
b)
x
c)
*
d)
/
20.
What character do we use for division?
a)
#
b)
x
c)
*
d)
/
21.
A function;
a)
Expresses a true false statement
b)
can contain letters, numbers, spaces, and symbols.
c)
takes in an input, does something with it, and then returns an output.
d)
Runs a boolean (true/false) statement based on data entered
22.
What surrounds an array?
a)
Quotations
b)
Curly Brackets
c)
Parenthesis
d)
Square Brackets
23.

What is function ?

a)

Block of code/Reusable code

b)

Store value

c)

Party

d)

All of above

24.

Which of the following methods lets you access all occurrences of an HTML tag in a Webpage?

a)

getElementByID

b)

getElementsByName

c)

getElementsByTagName

d)

innerHTML

25.

The simplest data-storing structure in any programming language

a)

Lists

b)

Array

c)

Queue

d)

List

26.

What is the symbol pair used to write a new line within a string values?

a)

\*

b)

\'

c)

\n

d)

\br

27.

Which one of the following is a closing HTML tag?

a)

<html />

b)

</html>

c)

<</html>>

d)

<html>

28.

Which of the following is the correct way to add an attribute?

a)

<src>

b)

classes:ids

c)

id="title"

d)

<id>

29.

What symbol should you use to target a class name in css?

a)

#

b)

()

c)

.

d)

class

30.

TRUE OR FALSE: All tags require a closing tag.

a)

True

b)

False

31.

TRUE OR FALSE: HTML is used to add content to web pages.

a)

True

b)

False

32.

Which of the following is the correct CSS link tag?

a)

<link rel="styles" href="stylesheet.css">

b)

<link href="stylesheet">

c)

<link rel="stylesheet" src="styles.css">

d)

<link rel="stylesheet" href="styles.css">

33.
What is pseudocode?
a)
Simplified programming language, that is not a specific language
b)
Complicated programming language
c)
Simple programming language, which is linked to a specific language
d)
A type of cheese
34.

What does an algorithm need to be (choose more than 1)

a)

Clear instructions

b)

Exact

c)

Easy to understand

d)

Complex

35.

What does PHP stands for?

a)

PHP: Hypertext Preprocessor

b)

Private Home Page

c)

Personal Hypertext Processor

36.

PHP is a____________side scripting language

a)

server

b)

browser

c)

client

37.

Which of the following is not true?

a)

PHP can be used to develop web applications.

b)

PHP makes a website dynamic

c)

PHP can not be embedded into html.

38.

_______ is a concatenation operator in php

a)

+ (plus)

b)

+=

c)

. (dot)

39.

find the output

<?php

$x = 1;

$x += 1;


echo $x;

?>

a)

2

b)

1

c)

0

40.

$colours = array("black", "blue", "Red", Green") - How do I access "Red" ?

a)

$colours[0];

b)

$colours[2];

c)

$colours[1]

d)

$colours[3];

41.

Loop

a)

Loops that have a predetermined beginning, end, and increment (step interval).

b)

The action of doing something over and over again.

c)

A description of the behavior of a command, function, library, API, etc.

d)

To repeat in order to achieve, or get closer to, a desired goal.

42.

When someone clicks, taps, or types on a computer screen this generates a(n)...

a)

code

b)

event

c)

algorithm

d)

program

43.

What does it mean to debug a program?

a)

The instructions for a program

b)

A set of code given to a computer to accomplish a task.

c)

To find and fix bugs in a program.

44.

What type of data would the letter 'K' be?

a)

Boolean

b)

String

c)

Character

d)

Real

45.

What type of data would your age in years be?

a)

Real

b)

Integer

c)

String

d)

Boolean

46.

Which SQL function is used to count the number of rows in a SQL query?

a)

COUNT()

b)

NUMBER()

c)

SUM()

d)

COUNT(*)

47.

The UPDATE SQL clause can _____________

a)

update only one row at a time

b)

update more than one row at a time

c)

delete more than one row at a time

d)

delete only one row at a time

48.

What does "SQL" stand for?

a)

Structured Question Language

b)

Structured Query Language

c)

Simple Query Language

d)

Simple Question Language

49.

If you were wanting to filter data, which clause would you use?

a)

Where

b)

Order by

c)

From

d)

Select

50.

How would you display Chairs in the Items table that have a Price greater than £50.

a)

SELECT * FROM Items WHERE Type = 'Chair' AND Price > 50

b)

SELECT * FROM Items WHERE Type = 'Chair' OR Price < 100

c)

SELECT * FROM Iterms WHERE Type = 'Chair' AND Price >= 50

d)

SELECT * FROM Items WHERE Price > 50

51.

Which of the following is not a database data type?

a)

text

b)

number

c)

array

d)

date

52.

SQL Query to delete all rows in a table without deleting the table (structure, attributes, and indexes)

a)

DELETE FROM table_name;

b)

DELETE TABLE table_name;

c)

DROP TABLE table_name;

d)

None

53.

SQL has how many main commands for DDL:

a)

1

b)

2

c)

3

d)

4

54.

A primary key can be NULL in the table? TRUE or FALSE

a)

TRUE

b)

FALSE

55.

What is the difference between v-show and v-if?

a)

Nothing. It's just syntactic sugar.

b)

v-show uses styles to hide the element

c)

v-if removes the element from the DOM

56.

What types of objects can you iterate over using v-for?

a)

Arrays

b)

Objects

c)

Numbers

57.
A disadvantage of programming in Low Level is
a)
No technical skill is required
b)
Needs to be translated before it can be executed
c)
Difficult for humans to debug
58.
An advantage of programming in High Level is
a)
Easier for us to understand
b)
Useful for device drivers
c)
Programs execute faster than other generations
59.

An INPUT is

a)

information that goes INTO a computer or device

b)

information that comes OUT of a computer or device

60.

An OUTPUT is

a)

information that goes INTO a computer or device

b)

information that comes OUT of a computer or device