Page 332 - AI Ver 1.0 Class 9
P. 332
3. Which of the following statements allows to repeat a task for a fixed number of times?
a. for statement b. if…else statement
c. while statement d. continue statement
4. Which of the following can be a part of a list?
a. String values b. Integer values
c. List d. All of these
5. If a list named L1 contains 4 elements, then which of the following can be used to access the last element of the L1 list?
a. L1[4-1] b. L1[4]
c. L1[-1] d. Both a and c
B. Fill in the blanks.
1. An ………………………. uses simple English-like statements.
2. ………………………. and ………………………. are important tools before we write an actual code in a specific computer language.
3. ………………………. uses symbols for writing a set of instructions.
4. ………………………. is used for preparing documentation of an application.
5. ………………………. designed Python and released it in 1991 can be freely downloaded from the website ………………………. .
6. Examples of assignment operators are ………………………. and ………………………. .
7. ………………………. is a character encoding standard that uses numeric codes to represent characters in upper and lower
cases, numbers, and punctuation symbols.
8. ………………………. is a special literal.
9. In ………………………. programming, the program instructions are executed one after the other in a sequence.
10. The block of statements is executed based on a ………………………. using if statement.
11. ………………………. keyword is optional with if statement.
12. ………………………. means visiting each element and processing it as required by a program.
13. ………………………. indexing begins with -1.
14. The elements in a list can be of ………………………. data types.
15. ………………………. function will delete all the elements in a list.
C. State whether these statements are true or false.
1. Modification of the program through flowchart is sometimes time-consuming. ……….……
2. It is easy to represent branching and looping in an algorithm. ……….……
3. CodeCombat is a free coding educational game available on the internet. ……….……
4. Integers are used for mathematical calculations. ……….……
5. Python is easy to learn as a high-level programming language. ……….……
6. It is optional to specify colon(:) after writing a condition with the if statement ……….……
7. Step value can be -ve or +ve in for loop. ……….……
8. Each value/element is separated by a comma. ……….……
9. There are different ways of visiting each element of a list. ……….……
10. The append() can be used to append any value at any location in a list. ……….……
330 Touchpad Artificial Intelligence-IX

