wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

DeltaMath & Python 325

Total questions: 23

Worksheet time: 15mins

Name
Class
Date
1.

What is printed by this DeltaMath pseudocode?

a)

1 5 2

b)

1 t a

c)

1 2 2

d)

1 3 2

e)

1 5 3

2.

Used to create exponents

a)

**

b)

"""

c)

%

d)

#

3.

returns the remainder from division

a)

modulo

b)

exponments

c)

boolean

d)

variables

4.

10= 100
Which of the following is used in Python to calculate ten squared?

a)

10 ** 2

b)

10 * 2

c)

10 % 2

d)

10 ** 10

5.

What will this code output?

var x = 8;

var y = 3

x = x-y;

println(x);

a)

8

b)

3

c)

5

d)

2

6.

What will this code output?

var x = 6;

var y = 2;

x = x+y;

println(x);

a)

8

b)

2

c)

6

d)

12

7.

Which type of operator only returns the values true and false?

a)

Comparison

b)

Arithmetic

c)

Procedural

d)

Assignment

8.

What would print (10 + 16) produce?

a)

10

b)

16

c)

24

d)

26

9.

What will this Python code output?

a)

1 8 4

b)

3 4 1

c)

1 4 3

d)

a, b, c

e)

8 4 1

10.

What will this Python code output?

a = 31 % 5

print(a)

a)

a

b)

6.2

c)

6

d)

5

e)

1

11.

How do you insert COMMENTS in Python code?

a)

// This is a comment

b)

# This is a comment

c)

/* This is a comment */

d)

' This is a comment

12.

What will this JavaScript code output?

a)

d f

b)

a b c d e f

c)

c e f

d)

b f

e)

d e f

13.
How many choices are possible when using a single if-else statement?
a)
1
b)
2
c)
3
d)
4
14.

The "If" Statement is an example of a _________________

a)

Correctional Statement

b)

Competitive Statement

c)

Conditional Statement

d)

Inquisitive Statement

15.
Evaluate the following expression:
2 + 2 == 4
a)
true
b)
false
c)
sometimes true
d)
only true on sundays
16.

What will be the value of after this set of conditional statements?

a)

7

b)

9

c)

10

d)

4

17.

What will be the output of this code? (hint: the == operator can be used on strings to see if they have the same value, meaning the same exact sequence of characters)

a)

same name

b)

different names

18.

Follow up: what is the output of this code?

a)

a

b)

b

c)

c

19.

An if statement (i.e. if (condition) { ... }) will only execute if...

a)

The condition is true

b)

The condition is false

c)

It always executes

d)

It never executes

20.

What will be the output after the following statements?

a)

0

b)

1

c)

2

d)

15

e)

error

21.

What will be the output after the following statements?

a)

15

b)

yes

c)

equal

d)

no

e)

error

22.

What will be the output after the following statements?

a)

false

b)

true

c)

not false

d)

not true

e)

error

23.

What will be the output after the following statements?

a)

true

b)

not false

c)

false

d)

not true

e)

error