Font size
WorksheetsOverall programming tests
Total questions: 60
Worksheet time: 30mins
Which of these is a loop?
if(x<10)
while(x<10)
var x=10;
text(x,10;10)
Which of the following will decrease the value of x?
x--;
x-1;
x=x;
x=-x;
Which one is greater than or equal to
> or =
> || =
>=
<=
When we surround a word with quotes "David" it's called ?
a program
a loop
a string
a command
A short form writing the word variable is
rav
VAR
var
varia
What is the value of:
”31” - 1
“30”
30
“311”
NaN
JavaScript functions can access variables defined in the same scope?
True
False
Which tag indicates the presence of javascript
<css>
<script type="text/javascript">
<?php>
<style>
What other languages are typically used with JavaScript?
Python
Ruby
HTML & CSS
SQL
What is Javascript?
programming language
HTML tags
CSS
A web page
What is first index value of an array?
-1
0
1
undefine
His name is Fred and he is less than 16 years old
if (name = "fred" && age < 16 )
if (name === "fred" && age < 16 )
if (name = "fred" || age < 16 )
if (name === "fred" || age < 16 )
Repeat something 10 times
repeat 10
for (var i=0; i<10; i++)
repeat { } until 10;
while (i = 10)
JavaScript is an ________ language.
compiled
interpreted
Variable names cannot start with numbers.
True
False
Which mathematical assignment is the "increment operator"?
+=
++
--
+-
What is function ?
Block of code/Reusable code
Store value
Party
All of above
Which of the following methods lets you access all occurrences of an HTML tag in a Webpage?
getElementByID
getElementsByName
getElementsByTagName
innerHTML
The simplest data-storing structure in any programming language
Lists
Array
Queue
List
What is the symbol pair used to write a new line within a string values?
\*
\'
\n
\br
Which one of the following is a closing HTML tag?
<html />
</html>
<</html>>
<html>
Which of the following is the correct way to add an attribute?
<src>
classes:ids
id="title"
<id>
What symbol should you use to target a class name in css?
#
()
.
class
TRUE OR FALSE: All tags require a closing tag.
True
False
TRUE OR FALSE: HTML is used to add content to web pages.
True
False
Which of the following is the correct CSS link tag?
<link rel="styles" href="stylesheet.css">
<link href="stylesheet">
<link rel="stylesheet" src="styles.css">
<link rel="stylesheet" href="styles.css">
What does an algorithm need to be (choose more than 1)
Clear instructions
Exact
Easy to understand
Complex
What does PHP stands for?
PHP: Hypertext Preprocessor
Private Home Page
Personal Hypertext Processor
PHP is a____________side scripting language
server
browser
client
Which of the following is not true?
PHP can be used to develop web applications.
PHP makes a website dynamic
PHP can not be embedded into html.
_______ is a concatenation operator in php
+ (plus)
+=
. (dot)
find the output
<?php
$x = 1;
$x += 1;
echo $x;
?>
2
1
0
$colours = array("black", "blue", "Red", Green") - How do I access "Red" ?
$colours[0];
$colours[2];
$colours[1]
$colours[3];
Loop
Loops that have a predetermined beginning, end, and increment (step interval).
The action of doing something over and over again.
A description of the behavior of a command, function, library, API, etc.
To repeat in order to achieve, or get closer to, a desired goal.
When someone clicks, taps, or types on a computer screen this generates a(n)...
code
event
algorithm
program
What does it mean to debug a program?
The instructions for a program
A set of code given to a computer to accomplish a task.
To find and fix bugs in a program.
What type of data would the letter 'K' be?
Boolean
String
Character
Real
What type of data would your age in years be?
Real
Integer
String
Boolean
Which SQL function is used to count the number of rows in a SQL query?
COUNT()
NUMBER()
SUM()
COUNT(*)
The UPDATE SQL clause can _____________
update only one row at a time
update more than one row at a time
delete more than one row at a time
delete only one row at a time
What does "SQL" stand for?
Structured Question Language
Structured Query Language
Simple Query Language
Simple Question Language
If you were wanting to filter data, which clause would you use?
Where
Order by
From
Select
How would you display Chairs in the Items table that have a Price greater than £50.
SELECT * FROM Items WHERE Type = 'Chair' AND Price > 50
SELECT * FROM Items WHERE Type = 'Chair' OR Price < 100
SELECT * FROM Iterms WHERE Type = 'Chair' AND Price >= 50
SELECT * FROM Items WHERE Price > 50
Which of the following is not a database data type?
text
number
array
date
SQL Query to delete all rows in a table without deleting the table (structure, attributes, and indexes)
DELETE FROM table_name;
DELETE TABLE table_name;
DROP TABLE table_name;
None
SQL has how many main commands for DDL:
1
2
3
4
A primary key can be NULL in the table? TRUE or FALSE
TRUE
FALSE
What is the difference between v-show and v-if?
Nothing. It's just syntactic sugar.
v-show uses styles to hide the element
v-if removes the element from the DOM
What types of objects can you iterate over using v-for?
Arrays
Objects
Numbers
An INPUT is
information that goes INTO a computer or device
information that comes OUT of a computer or device
An OUTPUT is
information that goes INTO a computer or device
information that comes OUT of a computer or device
