Page 334 - Artificial Intellegence_v2.0_Class_9
P. 334
11. Which of the following conditional statements is used to test multiple conditions?
a. if b. if…elif…else
c. if…else d. All of these
12. What will be the output of the following code?
if(True):
print("Hello")
else:
print("Hi")
a. Hello b. Hello Hi
c. Hi d. Nothing will print
13. If L1 = ['O', 'R', 'A', 'N', 'G', 'E'], then what will be the output of the following statement?
print(L1)
a. 'ORANGE' b. ['O', 'R', 'A', 'N', 'G', 'E']
c. 'O', 'R', 'A', 'N', 'G', 'E' d. None of these
14. Consider the following code:
A = ["Orange"]
B = ["Education"]
C = A + B
print(C)
Which of the following will be the output of the preceding code?
a. ['Orange', 'Education'] b. ['Orange Education']
c. Orange Education d. Orange + Education
15. If L1 = ['O', 'R', 'A', 'N', 'G', 'E'], then which of the following will be the output of the given statement?
print(L1[::-1])
a. Prints the list as it is b. Prints the list in reverse order
c. Prints the last element of the list d. Prints the first element of the list
B. Fill in the blanks.
1. A ………………………. is written in any programming language.
2. In ………………………. flow statements are placed one after the other.
3. In branching statement, condition evaluates to either ………………………. or ………………………. .
4. Algorithm is ………………………. approach to identify and solve a problem.
5. Python is an ………………………. language.
6. Remainder operator and floor division are ………………………. operators.
7. ………………………. and ………………………. are two different ways of writing comments.
8. The ………………………. function is used to find the data type of the objects.
9. A ………………………. is a set of instructions given to a computer to do a specific task.
10. Conditional programming allows a block of statement to be executed based on a …………………. .
11. There are ………………………. ways to repeat a set of instructions in Python.
332 Touchpad Artificial Intelligence (Ver. 2.0)-IX

