This often comes after if/elif
What is else?
This is the character returned by "theCoderSchool"[5]
What is "d"?
This is a way of repeating a set of code many times
What is a loop?
4**2 is equal to this number.
What is 16?
This is considered a good first programming language and generally the first language learned by programmers.
What is Python?
Boolean operators provide these as answers.
What is true and false?
Variables can be defined both inside or outside of a function. This determines if a variable is inside or outside of the function.
What is spacing or indent?
def letter_grade(score):
if score <60:
return "F"
elif score <70:
return "D"
else:
return "C or higher"
print(letter_grade(85))
What is C or higher?
This is an error that occurs when a character is incorrectly placed.
What is a syntax error?
If you want to add programmer to this list....
careers = ["doctor", "teacher", "accountant"]
careers.append("programmer")
This operation is represented by % to get the remainder.
What is modulo/modulus?
The answer for this problem:
x<5 or x<4
What is true?
Determine the function name and the string.
def family():
print ("My family has pets")
family()
What is family and My family has pets?
This is a particular type of list
children = []
What is an empty list?
Here's a bit of code. It would print:
season = "Spring is the best"
for i in range(5):
print(season)
What is
Spring is the best
Spring is the best
Spring is the best
Spring is the best
Spring is the best
Many companies require you to do this before you publish your programs for use.
What is test and debug?