1. _______ refers to the entirety of a computer system or application, comprising both the front end and the back end.
2. HTML is an example of a back end language.
3. Decomposition is about breaking a big problem into smaller solvable sub problems. This is an example of _____________.
4. The following is an example of a _________ in python. It contains a number of different fruits.
5. When the code above is executed (run), the output is: banana. What is the output for the command print(fruits[0])?
6. The following code uses several functions. What is the output of this program code when run?
7. In Python, a ________ declared outside of the function or in global scope is known as a global variable.
8. In the following code, we are attempting to modify the variable 'c' insde the function 'add'. What is the output?
9. Here we have a function named 'foo'. We call the function and try to print the local variable y. Which of the following statements is correct?
10. In the code below y is a global variable and x is a local variable in the foo function. The ouput is 10 and 3.
11. What is the output of the following program? Which of the following statements is correct?
12. The programmer wants the output to be "Player has been shot ('Current health critical:', 10)" but instead there is an error. On what line is the error and what needs to be done?
13. What is the output of the following program?
14. Decomposition is important in problem solving. It involves breaking down a complex problem into _________________________.
15. Read the following excerpt and fill in the blanks.
16. What code should go on line 9 if we wish for the score to go up by 1 if the answer is correct? (incrementation of score)
17. The following code has two errors that will prevent it from running. What are they?
18. In the following program there is a LOGICAL ERROR. The user enters 3 and then 3, but the output is 33 instead of 6. Why?
19. What is the output of the following program?
def logicfollow():
a=2
b=5
b=b+1
c=a+1
d=c+b
z=a
print(z+b)
logicfollow()
20. The three programming constructs are sequence, selection and iteration. Iteration refers to the use of ________.