Q1. What is a Boolean?
A statement that is either
True
orFalse
A statement with many possible outcomes
Used as a variable name
Used as a place
Q2. Why are global variables helpful?
They are limited to what they can do
They can be used in any function in the file where they are set
They can be changed inside the function
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 timesfor
loops are used only for textfor
loops are used only for numbersfor
loops can only work with dictionaries
Q4. What would be a good time to use a while
loop in a game?
To run a game a specified number of times
To run a game forever
To keep a game going while a certain condition is true
To end the game
Q5. What symbol is used to write comments in the code that are not a part of the code?
?
*
()
#