Page 342 - AI Ver 1.0 Class 9
P. 342
S. No Questions Answers
18 Which of the following expression(s) is/are True? a and b
a) False and False or not False
b) False or not (False and True)
c) True and False or not True
d) True and not True
19 What will be the output of the following code? a) 0
int (True and False)
a) 0 b) 1 c) True d) False
20 Which of the following statements is True if: a and d
Condition: p is a two-digit even number
a) p%2==0 and 10<=p<=99
b) p/2==0 and p>=10 and p<100
c) p%2==0 or p>=0 or p<=100
d) p%2==0 and p>=10 and p<=99
21 Identify the errors in the following code and rewrite the age=12
correct code: if age==20:
12=age
print("allowed to drive")
If age=20:
else:
print("allowed to drive’)
print(‘Not allowed’):
else:
print(‘Not allowed):
22 What will be the output of the following code? 30 270
p=10
q=15
p*=q//4
q+=p+q**2
print(p,q)
23 What will be the output of the following code? 444
if n=4:
n=input("enter number")
print(n*3)
340 Touchpad Artificial Intelligence-IX

