NEW
Font size
WorksheetsM:B Lesson #8
Total questions: 8
Worksheet time: 4mins
There are several different data types used in computer programming. We have already used two of these types:
Integer and String
String and Core
Core and Python
Data and Core
A boolean data type has only two values:
right or affirmative
true or false
false or wrong
yes or righty-0
Examples of Booleans in daily life:
Lights: On or Off
Time: AM or PM
Weather: Raining or Not Raining
All of the above
True or False? Booleans are useful in programming for decision-making.
True
False
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:
Mary Boolean
George Boole
Thaddeus Booley
Temperance Boo
How do we get a random flip in code?
Most computer programming languages have a built in function that will select a random number given a range of values.
Microsoft MakeCode has a block for this
Microsoft MakeCode also has a block for getting a random true or false value.
All of the above
True or False? The initial value of a variable is the value the variable will hold each time the program starts.
True
False
By default:
a string variable is initialized to an empty string "" a number variable is initialized to 0 a Boolean is initialized to ______________
false
true
sometimes
