Chapter 3
Q1. What is used in programming to hold a piece of data?
A: A variable.
Q2: What simple function can be used to send information to the Output window?
A: print()
.
Q3: What data type should you use if you want to represent a value of true
or false
?
A: A Boolean.
Q4: What data type is used if you want to represent a word or characters?
A: A string.
Q5: What is used in programming when we want to check if a condition is met?
A: A conditional statement or if
statement.
Q6: What is used in programming when some action must be done repeatedly so long as a condition is met?
A: A loop.
Q7: What loop would be best to use if we want something to happen an exact number of times?
A: A for
loop, more specifically a numeric for
loop.
Q8: What type of loop is best if we want something to always happen as long as some condition is met?
A: A while
loop.
Q9: What type of loop is best if we want to do something immediately once...