wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

software dev

Total questions: 50

Worksheet time: 25mins

Name
Class
Date
1.

What does an iterative structure do?

a)

repeat, loop

b)

decided which code should run

c)

what it wants

d)

KungFu

2.

What does a decision statement do?

a)

what it wants

b)

repeat

c)

decide which code should run

3.

Which of these variables holds decimal numbers?

a)

double

b)
int
c)
String
d)
boolean
4.

Which of these variables holds words?

a)

double

b)

int

c)

String

d)

boolean

5.
Which of these variables holds true or false?
a)
double
b)
int
c)
String
d)
boolean
6.
An object from what class holds input from the user?
a)
System
b)
Scanner
c)
String
d)
Selena
7.
single line comments, which the computer doesn't read, start with
a)
//
b)
..
c)
**
d)
uppercase letters
8.
Which of these moves the cursor to the next line beneath the printed output: 
a)
System.out.print("Hello world.");
b)
System.out.println("Hello world.");
9.

comparing two ints

a)

this == that

b)

this.equals(that)

10.

comparing two strings

a)

this == that

b)

this.equals(that)

11.

Which means 'OR'?

a)

||

b)

&&

c)

==

d)

!

12.

Which means 'AND'?

a)

||

b)

&&

c)

==

d)

!

13.

Which means 'NOT'?

a)

||

b)

&&

c)

==

d)

!

14.

int cats = 2;

System.out.print("cats");

What will print?

a)

cats

b)

2

15.

int cats = 2;

System.out.print( cats );

What will print?

a)

cats

b)

2

16.

All cases of a switch statement print if:

a)

you forget break statements

b)

you forget a closing curly bracket

c)

you forget a semicolon

d)

you forget a period

17.

Which two are decision structures?

a)

if-else

b)

for loop

c)

switch

d)

while loop

18.

A bit is

a)

not too much work, just a few problems

b)

The smallest unit of information, can be a 1 or a 0, on or off, true or false

c)

a small amount of dessert

d)

something teeny

19.

a = 2

b = 2

if a == b or a < c:

print('dog')

else:

print('cat')

a)

dog

b)

cat

c)

nothing

20.

smallest to largest

a)

KB

MB

GB

TB

PB

EB

ZB

b)

ZB

EB

PB

TB

GB

MB

KB

c)

KB

GB

PB

ZB

MB

PB

EX

ZB

d)

PB

EB

TB

GB

KB

MB

ZB

21.

Which file size is used for measuring the size of a movie file? ( .mov )

a)

KB

b)

MB

c)

GB

d)

TB

22.

Which file size is used for measuring the size of a modern hard drive?

a)

KB

b)

MB

c)

GB

d)

TB

23.
while loop
a)

a loop that iterates, or repeats, until a condition is changes

b)
a loop that iterates, or repeats, for a set number of times
c)
makes a decision based on input
d)
creates spaces in memory that holds elements all of the same types
24.
for loop
a)
a loop that iterates, or repeats, until a condition is met
b)
a loop that iterates, or repeats, for a set number of times
c)
makes a decision based on input
d)
creates spaces in memory that holds elements all of the same types
25.

do-while loop

a)

an iterative structure that loops until a condition is met

b)

an iterative structure that loops a set number of times

c)

an iterative structure that loops by being a function that invokes, or calls on, itself repeatedly until the base case is met

d)

an iterative structure that runs once then checks to see if should keep running (this guy jumps before looking)

26.

name + rule

a)

AND = both on

b)

OR = at least one on

c)

NOT = flip

d)

XOR = different

27.

name + rule

a)

NAND = not both on

b)

NOR = nothing on

c)

NOT = flip

d)

XNOR = same

28.

name + rule

a)

NAND = not both on

b)

NOR = nothing on

c)

NOT = flip

d)

XNOR = same

29.

0010 00012

a)

12910

b)

6510

c)

3310

d)

510

30.

can be used by all of the functions in a program

a)

global variable

b)

local variable

c)

block variable

d)

metavariable

31.

print( 'Alien v Predator' )

a)

Python

b)

Java

c)

HTML/CSS

d)

SQL

32.

large databases can be quickly searched using:

a)

arrays

b)

double arrays

c)

hashmaps

d)

the force

33.

The output of Math.floor(36.987) is

a)

36

b)

37

c)

35

34.

The ___ method is used to round a number down.

a)

Math.ceil()

b)

Math.random()

c)

Math.pow()

d)

Math.floor()

35.
What's the data type?
a)

String

b)

int

36.

These variables are declared outside any function, starts with public static, and can be accessed anywhere

a)

LOCAL

b)

GLOBAL

c)

CONTROL

d)

CONSTANT

37.

Which method was used to convert this String: "Life is TOO SHORT to be BORED" to: "life is too short to be bored" ?

a)

.toLowerCase()

b)

.toUpperCase()

c)

.equals()

d)

.length()

38.

Which method was used to convert this String: "IT learners are clever" to "IT LEARNERS ARE CLEVER" ?

a)

.toUpperCase()

b)

.toLowerCase()

c)

.equals()

d)

.length()

39.

Which method to use to find length of a string?

a)

.length()

b)

.size()

c)

.long()

d)

.count()

40.

String txt = "Hello World";

System.out.println(txt.toUpperCase());


Choose the correct output.

a)

"HELLO WORLD"

b)

HELLO WORLD

c)

Hello world

d)

Hello World

41.
What kind of gate is this?
a)
AND
b)
NOT
c)
OR
d)
XOR
42.
What kind of gate is this?
a)
AND
b)
NAND
c)
OR
d)
XAND
43.

What is OUTPUT?

a)

1

b)

0

44.

Which means wild card, or 'all the things'?

a)

//

b)

!

c)

*

d)

wc

45.

block comments, which the computer doesn't read, and begin programs with infortion

a)

//

b)

..

c)

/**

*

**/

d)

uppercase letters

46.

single inline comments, which the computer doesn't read, start with

a)
//
b)
..
c)
**
d)
uppercase letters
47.

Why would you want to create a function like jump()?

a)

recycling: plastic is bad for the planet

b)

reducing: you can reduce your risk of carpal tunnel

c)

refactoring: you can reuse the same code over and over without retyping it, just calling on it

d)

realizing: coding is...not for me, what's a function

48.

public static void friday( int num ){

// What does this function return?

}

a)

void means nothing

b)

friday()

c)

int

d)

num

49.

public static void friday( int num ){

// What is the name of this function?

}

a)

void means nothing

b)

friday()

c)

int

d)

num

50.

public static void friday( int num ){

// What is the parameter of this function?

}

a)

void means nothing

b)

friday()

c)

int

d)

public static