Page 89 - Touchcode_C7_Flipbook
P. 89
B. State whether the following statements are true (T) or false (F).
1. Functions enhance the readability of a program.
2. Arguments are the values that are passed on to the function.
3. Modifying a collection’s elements while iterating will not throws an error.
4. Collections that are not immutable are mutable.
5. Earlier computers were programmed by changing ones and zeros manually.
6. High level language is difficult to learn and time-consuming to code.
C. Fill in the blanks.
1. An ........................... gets executed, when that event occurs.
2. Functions can be individually ............................
3. Lists which are not fixed-size are referred to as ........................... size.
4. Variables are used to store ............................
5. You cannot iterate or modify a collection which is ............................
6. To sort items, you need to ........................... two items.
D. Match the following:
1. DRY a. Values passed on to the function
2. Function b. Arranging data into meaningful order
3. Parameters c. Don’t Repeat Yourself
4. Arguments d. Minimize errors, keep code short
5. Sorting e. Variables local to function
E. Answer the following questions:
1. What is pattern?
2. What do you mean by event handler?
3. What are the different types of modifications that you can perform on collections?
4. How can we iterate over collections?
5. Name the diferent mathematical operations which can be performed on variables in Python.
Test Sheet 2 87
87

