wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

M:B Lesson #8

Total questions: 8

Worksheet time: 4mins

Name
Class
Date
1.

There are several different data types used in computer programming. We have already used two of these types:

a)

Integer and String

b)

String and Core

c)

Core and Python

d)

Data and Core

2.

A boolean data type has only two values:

a)

right or affirmative

b)

true or false

c)

false or wrong

d)

yes or righty-0

3.

Examples of Booleans in daily life:

a)

Lights: On or Off

b)

Time: AM or PM

c)

Weather: Raining or Not Raining

d)

All of the above

4.

True or False? Booleans are useful in programming for decision-making.

a)

True

b)

False

5.

The English mathematician, educator, philosopher and logician, who worked in the fields of differential equations and algebraic logic, and is best known as the author of The Laws of Thought (1854) which contains Boolean algebra is:

a)

Mary Boolean

b)

George Boole

c)

Thaddeus Booley

d)

Temperance Boo

6.

How do we get a random flip in code?

a)

Most computer programming languages have a built in function that will select a random number given a range of values.

b)

Microsoft MakeCode has a block for this

c)

Microsoft MakeCode also has a block for getting a random true or false value.

d)

All of the above

7.

True or False? The initial value of a variable is the value the variable will hold each time the program starts.

a)

True

b)

False

8.

By default:

a string variable is initialized to an empty string "" a number variable is initialized to 0 a Boolean is initialized to ______________

a)

false

b)

true

c)

sometimes