(2 Points) : Hi Nithya, When You Submit This Form, The Owner Will Be Able To See Your Name and Email Address. Required
(2 Points) : Hi Nithya, When You Submit This Form, The Owner Will Be Able To See Your Name and Email Address. Required
(2 Points) : Hi Nithya, When You Submit This Form, The Owner Will Be Able To See Your Name and Email Address. Required
Internal Assessment 2
Hi nithya, when you submit this form, the owner will be able to see your name and email address.
Required
1.. What is the value of x x = 0 while (x < 100): x+=2 print(x)Required to answer.
Single choice.
(2 Points)
101
99
None of above
100
Simple loop
None of above
if a => 2;
if a >= 22
if a>=2 :
definite
indeterminate
for i in range(0,5):
for i in range(0,5)
for i in range(5)
Function composition
Fruitful function
Void function
7.What will be the output of the following Python code? >>>example = "snow
world" >>>example[3] = 's' >>>print exampleRequired to answer. Single choice.
(2 Points)
snow
snow world
snos world
Error
8. In which of the following loop in python, we can check the condition ?Required
to answer. Single choice.
(2 Points)
for loop
While loop
Do while loop
None of above
9.I went to interview at a village. There were 100 houses in a row. When I
interviewed the first 15 houses, I was too exhausted then I stopped. What
statement is used in the exampleRequired to answer. Single choice.
(2 Points)
Continue
Break
Pass
None of above
10.Which of the following will evaluate to true? I. True AND False II. False or True
III. False AND (True or False)Required to answer. Single choice.
(2 Points)
I
II
I and II
II and III
(5,1,6,2)
(5,1,7,6)
(5,1,7,6,2)
Function with pa
function composition
14
15
16
14.What will be printed by the following code when it executes? sum = 0 values =
[1,3,5,7] for number in values: sum = sum + number print(sum)Required to
answer. Single choice.
(2 Points)
4
16
capilaize()
lower()
toLower()
t[3] = 45
print(max(t))
print(len(t))
17.There were three computer in the shop, when Chhay went in the store. He pick
the first computer and he skip to take the third computer. What statement that
used in this exampleRequired to answer. Single choice.
(2 Points)
Break
Pass
Continue
None of above
15
None
19.: What does the following code print? if 4 + 5 == 10: print("TRUE") else:
print("FALSE") print("TRUE"). Single choice.
(2 Points)
True
True False
False True
str[11:16]
str[11][16]
str[11-17]
Error
None
22.Which of the following is the correcy way to access a specific element from a
Multi-Dimensional List?Required to answer. Single choice.
(2 Points)
list[row_size:column_size
list[rowsize][colsize]
list[(row_size)(column_size)
23.What will be the output of the following Python code? >>>my_tuple = (1, 2, 3,
4) >>>my_tuple.append( (5, 6, 7) ) >>>print len(my_tuple)Required to answer.
Single choice.
(2 Points)
1
Error
24.What will be the output of given Python code? str1="hello" c=0 for x in str1:
if(x!="l"): c=c+1 else: pass print(c)Required to answer. Single choice.
(2 Points)
2
Application
ApplicAtion
applicAtion
formatio
orma
ormat
30.What will be the output of the following Python code? def f1(): global x x+=1
print(x) x=12 print("x")Required to answer. Single choice.
(2 Points)
Error
13
13 x
While loop
Do while loop
32.Which among the following are mutable objects in Python? (i) List (ii) Integer
(iii) String (iv) TupleRequired to answer. Single choice.
(2 Points)
i
i and ii
iii and iv
iv
33.. What is the output of the following addition (+) operator a = [10, 20] b = a b
+= [30, 40] print(a) print(b)Required to answer. Single choice.
(2 Points)
[10, 20, 30, 40] [10,20,30,40]
[10,20] [10,20,30,40]
Option 2
str1
1.5
35.Suppose you run the following code: n = [[9, 8, 7], [6, 5, 4], [3, 2, 1]] print n[2]
What gets printed?Required to answer. Single choice.
(2 Points)
[6,5,7]
[3,2,1]
36.Q-4: What does the following code print? x = -10 if x < 0: print("The negative
nos", x, " is not valid here.") print("This is always printed"). Single choice.
(2 Points)
This is always printed
The negative nos -10 is not valid here This is always printed
The negative number -10 is not valid here
37.What is the output of the following range() function for num in range(2,-5,-1):
print(num, end=", ")Required to answer. Single choice.
(2 Points)
2, 1, 0
2.while loop
3.do while loop
39.What will be the result after the execution of above Python code?
list1=[3,2,5,7,3,6] list1.pop(3) print(list1)Required to answer. Single choice.
(2 Points)
[2,5,7,6]
[3,2,5,3,5,6]
[3,2,5,3,6]
[3,2,7,3,6]
2
0
print s.lower()
s[1] = ‘r’
print s.strip()
False
Error
None of above
43.What will be the output of the following Python code? >>>t1 = (1, 2, 4, 3)
>>>t2 = (1, 2, 3, 4) >>>t1 < t2Required to answer. Single choice.
(2 Points)
True
False
Error
None
44.What will be the output of the following Python code? def function1(var1=5,
var2=7): var2=9 var1=3 print (var1, " ", var2) function1(10,12)Required to answer.
Single choice.
(2 Points)
57
39
10 12
Error
45.What will be the output of the following Python code? >>>max("what are
you") a) error b) u c) t d) yRequired to answer. Single choice.
(2 Points)
Error
3+4==7
3+4
3==7
47.Given two variables, num1 and num2, which of the following would mean that
both num1 and num2 are positive integers?Required to answer. Single choice.
(2 Points)
num1 = num2)
([1,3],"abc",0,9)
([2,1],"abc",0,9)
Error
Skip
Repeat
50.What we put at the last of the loop ?Required to answer. Single choice.
(2 Points)
1.semicolon
2.colon
3.comma
Submit
This content is created by the owner of the form. The data you submit will be sent to the form owner. Microsoft is not
responsible for the privacy or security practices of its customers, including those of this form owner. Never give out
your password.
|
| Terms of use