What would be a good initial value for a score in a game?
1
None of the above
100
0
21 answers
100
Variables that track important data in a game are known as game ___.
variables
state
scores
loops
variables
state
scores
loops
state
How can we represent the value of dice (or coin faces) in Python?
None of the above
Using bool values
Using random numbers
Using images
None of the above
Using bool values
Using random numbers
Using images
Using random numbers
What function did we use to simulate rolling dice in today's app?
print()
float()
input()
int()
print()
float()
input()
int()
int()
___ is whether a number is even or odd.
Equity
Rarity
Parity
Arity
Equity
Rarity
Parity
Arity
Parity
How did we use the D.R.Y. principle in this lesson?
We generalized repetitive code by moving it into a function.
We removed the game loop to reduce repetition.
We didn't use the D.R.Y. principle in this lesson.
We removed buggy logic from our program.
We generalized repetitive code by moving it into a function.
We removed the game loop to reduce repetition.
We didn't use the D.R.Y. principle in this lesson.
We removed buggy logic from our program.
We generalized repetitive code by moving it into a function.
The function is_logged_in() is an example of a ___.
Boolean helper function
Expression helper function
Refactoring helper function
Debugging helper function
Boolean helper function
Expression helper function
Refactoring helper function
Debugging helper function
Boolean helper function
How did we use refactoring in this lesson?
We removed code from functions and put it into the main program area.
We debugged a broken project and fixed it.
We moved complicated logic into functions and tried to follow the D.R.Y. principle.
We didn't use refactoring in this lesson.
We removed code from functions and put it into the main program area.
We debugged a broken project and fixed it.
We moved complicated logic into functions and tried to follow the D.R.Y. principle.
We didn't use refactoring in this lesson.
We moved complicated logic into functions and tried to follow the D.R.Y. principle.
Why do we need refactoring?
Because it is required.
It helps the computer to read our code.
We don't need refactoring.
It helps other programmers (or our future selves) work with our code.
Because it is required.
It helps the computer to read our code.
We don't need refactoring.
It helps other programmers (or our future selves) work with our code.
It helps other programmers (or our future selves) work with our code.
Which sentence best-describes the process of refactoring?
None of the above.
A way to debug.
A way to improve the structure and readability of your code.
A way to make your code easier for the computer to read.
None of the above.
A way to debug.
A way to improve the structure and readability of your code.
A way to make your code easier for the computer to read.
A way to improve the structure and readability of your code.
___ helper functions make a boolean expression into a named function.
Expression
Debugging
Boolean
Refactoring
Expression
Debugging
Boolean
Refactoring
Expression