Font size
Worksheetssoftware dev
Total questions: 50
Worksheet time: 25mins
What does an iterative structure do?
repeat, loop
decided which code should run
what it wants
KungFu
What does a decision statement do?
what it wants
repeat
decide which code should run
Which of these variables holds decimal numbers?
double
Which of these variables holds words?
double
int
String
boolean
comparing two ints
this == that
this.equals(that)
comparing two strings
this == that
this.equals(that)
Which means 'OR'?
||
&&
==
!
Which means 'AND'?
||
&&
==
!
Which means 'NOT'?
||
&&
==
!
int cats = 2;
System.out.print("cats");
What will print?
cats
2
int cats = 2;
System.out.print( cats );
What will print?
cats
2
All cases of a switch statement print if:
you forget break statements
you forget a closing curly bracket
you forget a semicolon
you forget a period
Which two are decision structures?
if-else
for loop
switch
while loop
A bit is
not too much work, just a few problems
The smallest unit of information, can be a 1 or a 0, on or off, true or false
a small amount of dessert
something teeny
a = 2
b = 2
if a == b or a < c:
print('dog')
else:
print('cat')
dog
cat
nothing
smallest to largest
KB
MB
GB
TB
PB
EB
ZB
ZB
EB
PB
TB
GB
MB
KB
KB
GB
PB
ZB
MB
PB
EX
ZB
PB
EB
TB
GB
KB
MB
ZB
Which file size is used for measuring the size of a movie file? ( .mov )
KB
MB
GB
TB
Which file size is used for measuring the size of a modern hard drive?
KB
MB
GB
TB
a loop that iterates, or repeats, until a condition is changes
do-while loop
an iterative structure that loops until a condition is met
an iterative structure that loops a set number of times
an iterative structure that loops by being a function that invokes, or calls on, itself repeatedly until the base case is met
an iterative structure that runs once then checks to see if should keep running (this guy jumps before looking)
name + rule
AND = both on
OR = at least one on
NOT = flip
XOR = different
name + rule
NAND = not both on
NOR = nothing on
NOT = flip
XNOR = same
name + rule
NAND = not both on
NOR = nothing on
NOT = flip
XNOR = same
0010 00012
12910
6510
3310
510
can be used by all of the functions in a program
global variable
local variable
block variable
metavariable
print( 'Alien v Predator' )
Python
Java
HTML/CSS
SQL
large databases can be quickly searched using:
arrays
double arrays
hashmaps
the force
The output of Math.floor(36.987) is
36
37
35
The ___ method is used to round a number down.
Math.ceil()
Math.random()
Math.pow()
Math.floor()
String
int
These variables are declared outside any function, starts with public static, and can be accessed anywhere
LOCAL
GLOBAL
CONTROL
CONSTANT
Which method was used to convert this String: "Life is TOO SHORT to be BORED" to: "life is too short to be bored" ?
.toLowerCase()
.toUpperCase()
.equals()
.length()
Which method was used to convert this String: "IT learners are clever" to "IT LEARNERS ARE CLEVER" ?
.toUpperCase()
.toLowerCase()
.equals()
.length()
Which method to use to find length of a string?
.length()
.size()
.long()
.count()
String txt = "Hello World";
System.out.println(txt.toUpperCase());
Choose the correct output.
"HELLO WORLD"
HELLO WORLD
Hello world
Hello World
What is OUTPUT?
1
0
Which means wild card, or 'all the things'?
//
!
*
wc
block comments, which the computer doesn't read, and begin programs with infortion
//
..
/**
*
**/
uppercase letters
single inline comments, which the computer doesn't read, start with
Why would you want to create a function like jump()?
recycling: plastic is bad for the planet
reducing: you can reduce your risk of carpal tunnel
refactoring: you can reuse the same code over and over without retyping it, just calling on it
realizing: coding is...not for me, what's a function
public static void friday( int num ){
// What does this function return?
}
void means nothing
friday()
int
num
public static void friday( int num ){
// What is the name of this function?
}
void means nothing
friday()
int
num
public static void friday( int num ){
// What is the parameter of this function?
}
void means nothing
friday()
int
public static
