Chapter 5, Loops and Logic

Questions

Answers

Q1. What is a Boolean?

A statement that is either True or False

Q2. Why are global variables helpful?

Choice 2 and 3

Q3. for loops are similar to while loops. How is a for loop different from a while loop?

for loops are used to loop a specified number of times

Q4. What would be a good time to use a while loop in a game?

to keep a game going while a certain condition is True

Q5. What symbol is used to write comments in the code that are not a part of the code?

#

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.180.32