demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Started on Wednesday, 21 July 2021, 4:03 PM
State Finished
Completed on Wednesday, 21 July 2021, 4:03 PM
Time taken 25 secs
Question 1
Not answered
Marked out of 1.00
Python files are saved with the extension as ...?
Select one:
A. .python
B. .p
C. .pe
D. .py
The correct answer is: .py
1 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 2
Not answered
Marked out of 1.00
What is the name of the GUI that comes in-built as an interactive shell with Python?
Select one:
a. IDLE
b. PythonSh
c. PGUI
d. Pyshell
The correct answer is: IDLE
Question 3
Not answered
Marked out of 1.00
. IDLE stands for ... ?
Select one:
a. Integrated Development Learning Environment
b. Indie Developers Environment
c. Integrated Development Environment
d. .Indigenous Development Lab
The correct answer is: Integrated Development Learning Environment
2 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 4
Not answered
Marked out of 1.00
The function to display a specified message on the screen is ... ?
Select one:
a. print
b. output
c. display
d. run
The correct answer is: print
Question 5
Not answered
Marked out of 1.00
Which of the following is the use of id() function in python?
Select one:
a. returns identity of object
b. every object has does not have unique id
c. None of the mentioned
d. All the mentioned
The correct answer is: returns identity of object
3 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 6
Not answered
Marked out of 1.00
Which of the following is an invalid statement?
Select one:
a. a b c = 1000 2000 3000
b. a,b,c = 1000, 2000, 3000
c. abc = 1,000,000
d. a_b_c = 1,000,000
The correct answer is: a b c = 1000 2000 3000
4 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 7
Not answered
Marked out of 1.00
Which one of the following have the same precedence?
Select one:
a. Both pairs
b. * and /
c. None
d. + and -
The correct answer is: Both pairs
Question 8
Not answered
Marked out of 1.00
Which one of the following have the highest precedence in the expression?
Select one:
a. ()
b. exp
c. *
The correct answer is: ()
5 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 9
Not answered
Marked out of 1.00
Which of these in not a core data type?
Select one:
a. tuple
b. string
c. class
d. list
The correct answer is: class
6 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 10
Not answered
Marked out of 1.00
•What error occurs when you execute?
python=programming
Select one:
a. runtime error
b. Name error
c. type error
d. syntax error
The correct answer is: Name error
7 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 11
Not answered
Marked out of 1.00
What is the value of the expression:
len(list(str(4+int(2.39)%2)+"python"))
Select one:
a. 1
b. 7
c. 5
d. Error
The correct answer is: 7
8 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 12
Not answered
Marked out of 1.00
Select one:
a. Statement 8
b. Statement 2
c. Statement 5
d. Statement 6
The correct answer is: Statement 8
9 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 13
Not answered
Marked out of 1.00
Select one:
a. Option 2
b. Option 3
10 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
c. Option 4
d. Option 1
The correct answer is: Option 1
Question 14
Not answered
Marked out of 1.00
What is the maximum possible length of an identifier?
Select one:
a. 63
b. 79
c. 31
d. Any length
The correct answer is: Any length
11 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 15
Not answered
Marked out of 1.00
What is the value of the following expression8/4/2, 8/(4/2) The above expressions are
evaluated as: 2/2, 8/2, which is equal to (1.0, 4.0).
Select one:
a.
(4.0. 1.0)
b.
(1.0, 1.0)
c.
(4.0, 4.0)
d.
(1.0, 4.0)
The correct answer is:
(1.0, 4.0)
12 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 16
Not answered
Marked out of 1.00
What are the values of the following Python expressions? 2**(3**2), (2**3)**2 , 2**3**3
Select one:
a.
64,512
b. 64,64
c. 512.512
d. 512,64
The correct answer is: 512,64
Question 17
Not answered
Marked out of 1.00
The function pow(x,y,z) is evaluated as:
Select one:
a. (x**y)*z
b. (x**y) % z
c. (x**y) / z
d. (x**y)**z
The correct answer is: (x**y) % z
13 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 18
Not answered
Marked out of 1.00
Which operator is overloaded by the or() function?
Select one:
a. ^
b. /
c. |
d. \\
The correct answer is: |
Question 19
Not answered
Marked out of 1.00
Who developed python language
Select one:
a. Wick van Rossum
b. Niene stom
c. Ziz zenon
d. Guido Van Rossum
The correct answer is: Guido Van Rossum
14 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 20
Not answered
Marked out of 1.00
what do we use to define a block in python
Select one:
a. New line
b. indentation
c. {}
d. ( )
The correct answer is: indentation
15 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 21
Not answered
Marked out of 1.00
predict the output of function
Select one:
a. False
b. [2,4,6]
c. 0
d. True
The correct answer is: False
16 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 22
Not answered
Marked out of 1.00
Select the output of
any([5>8, 6>3, 3>1])
Select one:
a. Invalid code
b. False
c. 0
d. True
The correct answer is: True
17 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 23
Not answered
Marked out of 1.00
if
print(0xA + 0xB + 0xC)
what will be output.
Select one:
a. 33
b. 63
c. 0xA+0xB+0xC
d. None
The correct answer is: 33
18 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 24
Not answered
Marked out of 1.00
Which of the following is not a keyword in Python
Select one:
a. pass
b. nonlocal
c. eval
d. assert
The correct answer is: eval
19 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 25
Not answered
Marked out of 1.00
Predict the output
3*1**3
Select one:
a. 27
b. 3
c. 81
d. 9
The correct answer is: 3
20 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 26
Not answered
Marked out of 1.00
Which of the following is an assignment operator in Python?
Select one:
a. ==
b. >>>
c. =
The correct answer is: =
Question 27
Not answered
Marked out of 1.00
Which of the following is used to initialize multiple variables with a common value?
Select one:
a. x = y: y = 33
b. x = z; y = z; x = 33;
c. x = y = z = 33
d. x & y & z = 33
The correct answer is: x = y = z = 33
21 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 28
Not answered
Marked out of 1.00
Comments in Python begin with ...?
Select one:
a. $
b. //
c. #
d. {
The correct answer is: #
Question 29
Not answered
Marked out of 1.00
User input is read as ...?
Select one:
a. integer
b. Float
c. text string
d. boolean
The correct answer is: text string
22 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 30
Not answered
Marked out of 1.00
Output displayed by the print function will add this invisible character at the end of the
line by default ...
Select one:
a. \r
b. \t
c. \s
d. \n
The correct answer is: \n
23 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 31
Not answered
Marked out of 1.00
Output displayed by the print function will add this invisible character at the end of the
line by default ...
Select one:
a. New line
b. Without space
c. Double space
d. Single Space
The correct answer is: Single Space
24 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 32
Not answered
Marked out of 1.00
Which of the following will provide an ! character as alternative separator for the print
function?
Select one:
a. sep is !
b. sep >> '!'
c. separate = !
d. sep = '!'
The correct answer is: sep = '!'
25 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 33
Not answered
Marked out of 1.00
Which of the following will provide a * character as alternative line ending for the print
function?
Select one:
a. end as *
b. end to *
c. ending = '*'
d. end = '*'
The correct answer is: end = '*'
26 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 34
Not answered
Marked out of 1.00
What will be the output after the following statements?
x=6
y=3
print(x / y)
Select one:
a. 2.0
b. 18
c. 18.0
d. 2
The correct answer is: 2.0
27 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 35
Not answered
Marked out of 1.00
What will be stored in variable a
a=4&5%34**3
Select one:
a. 4
b. False
c. 0
d. 1
The correct answer is: 4
28 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 36
Not answered
Marked out of 1.00
What will be the output after the following statements?
x=3
y=7
print(x == y
Select one:
a. False
b. True
c. y = 7 and x = 3
d. x = 3 and y = 3
The correct answer is: False
29 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 37
Not answered
Marked out of 1.00
What will be the output after the following statements?
x = True
y = False
print(x or y)
Select one:
a. xy
b. True
c. Not Defined
d. False
The correct answer is: True
30 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 38
Not answered
Marked out of 1.00
What will be the output after the following statements?
x = '24' + '16'
print(x)
Select one:
a. 21
b. 2416
c. 46
d. 40
The correct answer is: 2416
31 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 39
Not answered
Marked out of 1.00
What will be the output after the following statements?
x=y=z=8
print(y)
Select one:
a. 8
b. y
c. z
d. x
The correct answer is: 8
32 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 40
Not answered
Marked out of 1.00
What will be the output after the following statements?
x = 'Python'
y = 'y' in x
print(y)
Select one:
a. true
b. false
c. [1]
d. y
The correct answer is: true
33 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 41
Not answered
Marked out of 1.00
What will be the data type of x after the following statements?
false = "This is not true"
x = false
Select one:
a. Boolean
b. Dictionary
c. List
d. string
The correct answer is: string
34 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 42
Not answered
Marked out of 1.00
What does the following statement do?
import keyword, sys
Select one:
a. Imports the keyword and sys functions
b. imports the directories named keyword and sys
c. Imports all the python keywords
d. Imports the keyword and sys modules
The correct answer is: Imports the keyword and sys modules
35 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 43
Not answered
Marked out of 1.00
Following code's output will be
a=15 b=10
if a>b:
print("b is greater")
print("end of if")
Select one:
a. b is greater
end of if
b. end of if
end of if
c. b is greater
d. indentation error
The correct answer is: indentation error
36 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 44
Not answered
Marked out of 1.00
give output:>>> 4&3 or 6 and 9
Select one:
a. 6
b. 9
c. 4
d. 3
The correct answer is: 9
Question 45
Not answered
Marked out of 1.00
Give the output of following expresion: 4*1**4
Select one:
a. 16
b. 1
c. 256
d. 4
The correct answer is: 4
37 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 46
Not answered
Marked out of 1.00
if a =3+2i what will be type of a
Select one:
a. None of the above
b. bool
c. int
d. Complex
The correct answer is: None of the above
Question 47
Not answered
Marked out of 1.00
a=4 b=5
a<<1^b
Select one:
a. 12
b. 11011
c. 13
d. 31
The correct answer is: 13
38 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 48
Not answered
Marked out of 1.00
What does IDE stand for?
Select one:
a. Integrated Drive Electronics
b. Internet Data Evaluation
c. Integrated Development Environment
d. Integrated Development Enterprises
The correct answer is: Integrated Development Environment
Question 49
Not answered
Marked out of 1.00
Which of the following command is used to print the output 01-Jan-2020 ?
Select one:
a. print('01','Jan', sep='-', end='2020')
b. print('01','Jan','2020', sep='-', end='-2020\n')
c. print('01','Jan', sep=' ', end='-2020')
d. print('01','Jan', sep='-', end='-2020')
The correct answer is: print('01','Jan', sep='-', end='-2020')
39 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 50
Not answered
Marked out of 1.00
Which of the following is not true about variable names?
Select one:
a. Variable names cannot begin with a digit
b. The length of the variable name is fixed
c. Can contain upper case or lowercase letters and digits 0-9
d. Variable names are case sensitive
The correct answer is: The length of the variable name is fixed
Question 51
Not answered
Marked out of 1.00
Which one is not a data type name of Python
Select one:
a. boolean
b. int
c. complex
d. bool
The correct answer is: boolean
40 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 52
Not answered
Marked out of 1.00
print(float(int(9/4+4))
Select one:
a. 6
b. 6.2
c. 6.0
d. 7
The correct answer is: 6.0
Question 53
Not answered
Marked out of 1.00
eval("3*5-b") will generate error
Select one:
True
False
The correct answer is 'True'.
41 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 54
Not answered
Marked out of 1.00
Match The following
terminate while and for loop Choose...
to find the length of string Choose...
The correct answer is: terminate while and for loop → break, to find the length of string
→ len()
Question 55
Not answered
Marked out of 1.00
Match the following
to remove '*' from given string left and right Choose...
To access last element of list Choose...
To reverse the string Choose...
The correct answer is: to remove '*' from given string left and right → strip('*'), To
access last element of list → [-1], To reverse the string → [::-1]
42 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 56
Not answered
Marked out of 1.00
Match the following
str.find can only give index
Choose...
of first matching string
to count the occurrence of
particular string in given Choose...
string
The correct answer is: str.find can only give index of first matching string → True, to
count the occurrence of particular string in given string → count()
Question 57
Not answered
Marked out of 1.00
for loop in python are work on
Select one:
a. None
b. Both
c. Iteration
d. range
The correct answer is: Both
43 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 58
Not answered
Marked out of 1.00
for loop in python is
Select one:
a. Exit Controlled
b. simple loop
c. None of these
d. entry controlled
The correct answer is: entry controlled
44 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 59
Not answered
Marked out of 1.00
How many times it will print the statement ?,
for i in range(100):
print(i)
Select one:
a. 0
b. 101
c. 100
d. 99
The correct answer is: 100
45 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 60
Not answered
Marked out of 1.00
In which of the following loop in python, we can check the condition ?
Select one:
a. do while loop
b. None of these
c. for loop
d. while
The correct answer is: while
Question 61
Not answered
Marked out of 1.00
It is possible to create a loop using goto statement in python ?
Select one:
a. None
b. No
c. Sometime
d. Yes
The correct answer is: No
46 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 62
Not answered
Marked out of 1.00
l=[],
for i in l:
print(l),
what is the output ?
Select one:
a. None of these
b. list()
c. []
d. print()
The correct answer is: None of these
47 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 63
Not answered
Marked out of 1.00
To stop the infinite loop , which keyword we use ?
Select one:
a. break
b. continue
c. else
d. exit
The correct answer is: break
Question 64
Not answered
Marked out of 1.00
which of the following is consider as a infinite loop ?
Select one:
a. None of these
b. for(1):
c. while(1):
d. while(infinte):
The correct answer is: while(1):
48 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 65
Not answered
Marked out of 1.00
Which of the following loop is work on the particular range in python ?
Select one:
a. recursion
b. for
c. do while
d. while
The correct answer is: for
Question 66
Not answered
Marked out of 1.00
While(0), how many times a loop run ?
Select one:
a. 0
b. 1
c. error
d. infinite
The correct answer is: 0
49 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 67
Not answered
Marked out of 1.00
while(1==3):, how many times a loop run ?
Select one:
a. Infinite
b. 0
c. 3
d. 1
The correct answer is: 0
50 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 68
Not answered
Marked out of 1.00
What will be the output of the following Python code?
x = ['ab', 'cd']
for i in x:
i.upper()
print(x)
Select one:
a. [None,None]
b. [‘AB’,‘CD’]
c. [‘ab’,‘cd’]
d. None of the mentioned
The correct answer is: [‘ab’,‘cd’]
51 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 69
Not answered
Marked out of 1.00
What will be the output of the following Python code?
x = ['ab', 'cd']
for i in x:
x.append(i.upper())
print(x)
Select one:
a. None of the mentioned
b. [‘ab’,‘cd’
c. [‘AB’,‘CD’]
d. [‘ab’,‘cd’,‘AB’,‘CD’]
The correct answer is: None of the mentioned
52 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 70
Not answered
Marked out of 1.00
What will be the output of the following Python code?
Select one:
a. 12
b. error
c. 123
d. None
The correct answer is: error
53 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 71
Not answered
Marked out of 1.00
What will be the output of the following Python code?
i=5
while True:
if i%0O11 == 0:
break
print(i)
i += 1
Select one:
a. 5 6
b. 5 6 7 8 9 10
c. 5 6 7 8
d. error
The correct answer is: 5 6 7 8
54 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 72
Not answered
Marked out of 1.00
What will be the output of the following Python code?
i=5
while True:
if i%0O9 == 0:
break
print(i)
i += 1
Select one:
a. 56789
b. error
c. 5678
d. 5 6 7 8 9 10 11 12 13 14 15 ….
The correct answer is: error
55 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 73
Not answered
Marked out of 1.00
What will be the output of the following Python code?
i=1
while True:
if i%2 == 0:
break
print(i)
i += 2
Select one:
a. 1
b. 1 2 3 4 5
c. 1 3 5 7 9...
The correct answer is: 1 3 5 7 9...
56 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 74
Not answered
Marked out of 1.00
Predict the output
Select one:
a. None of the mentioned
b. 0120
c. 012
d. error
The correct answer is: 012
57 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 75
Not answered
Marked out of 1.00
What will be the output of the following Python code?
Select one:
a. i i i i i ...
b. a b c d e f
c. abcdef
d. no output
The correct answer is: no output
58 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 76
Not answered
Marked out of 1.00
Predict the output of code shown below
Select one:
a. a a a a a a
b. a a a a a
c. i i i i i i
d. abcdef
The correct answer is: a a a a a a
59 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 77
Not answered
Marked out of 1.00
Select output:
for i in range(1,21,3):
if i == 2:
continue
i=i+2
print(i, end = " ")
Select one:
a. 3 6 9 12 15 18 21
b. 3 3 6 9 13 12 15 18
c. 3 9 12 15 18 21
d. 3 3 6 9 11 12 15 18
The correct answer is: 3 6 9 12 15 18 21
60 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 78
Not answered
Marked out of 1.00
Give Output
i=1
j=3
while i < 2:
while j < 5:
print(i, ",", end='X')
j = j + 1
i = i + 1
Select one:
a. None of the above
b. 1 x x
c. error
d. 1 ,X2 ,X
e. 1 ,X ,X2
The correct answer is: 1 ,X2 ,X
61 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 79
Not answered
Marked out of 1.00
Give output:
for i in range(2):
print(i)
for i in range(4,6):
print(i)
Select one:
a. 0, 1, 2, 4, 5, 6
b. 0, 1, 4, 5
c. 1, 2, 4, 5, 6
d. 0, 1, 4, 5, 6, 7, 8, 9
e. 2, 4, 6
The correct answer is: 0, 1, 4, 5
62 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 80
Not answered
Marked out of 1.00
fruits = ["apple","banana","cherry"]
what will be output of
>>>fruits[1][2]
Select one:
a. 'n'
b. 'e'
c. 'na'
d. None of these
The correct answer is: 'n'
63 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 81
Not answered
Marked out of 1.00
if S= “First Quiz of Python”
Give output:for ch in range(0,len(S),3):
print(s[ch],end=“ ”)
Select one:
a. F s t z f y o
b. F t Q
c. F s Q z f y o
d. F s Q z f y n
The correct answer is: F s Q z f y o
64 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 82
Not answered
Marked out of 1.00
if s1 = "spam"s2 = "ni!" Give output of: 3*s1+2*s2[-1]
Select one:
a. 'spamspamni!ni!'
b. 'spamspamspamni!'
c. 'spamspamspam!!'
d. 'spamspamspamni!ni!'
The correct answer is: 'spamspamspam!!'
65 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 83
Not answered
Marked out of 1.00
if str= "core python programming"
select the appropriate slicing operations to give the output as
'r yhnpormig'
Select one:
a. str[2:5:-2]
b. str[1::]
c. str[2:9:3]
d. str[2::2]
The correct answer is: str[2::2]
66 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 84
Not answered
Marked out of 1.00
•i = 2
•while True:
• if i%3 == 0:
• break
• print(i)
• i += 2
Select one:
a. 2 4
b. error
c. 2 4 6 8 10 …
d. 2 3
The correct answer is: 2 4
67 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 85
Not answered
Marked out of 1.00
Write the output
print((max(35,ord(min("pythonprograming")))))
Answer:
The correct answer is: 97
Question 86
Not answered
Marked out of 1.00
len(list("Python Programming".split()))
Answer:
The correct answer is: 2
68 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 87
Not answered
Marked out of 1.00
Strings are mutable ?
Select one:
True
False
The correct answer is 'False'.
Question 88
Not answered
Marked out of 1.00
if "a"+"bc" is executed then what will be output.
Select one:
a. abc
b. a+bc
c. a
d. a bc
The correct answer is: abc
69 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 89
Not answered
Marked out of 1.00
if
example = "snow world"
print("%s" % example[4:7])
predict the output.
Select one:
a. wo
b. world
c. sn
d. rl
The correct answer is: wo
70 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 90
Not answered
Marked out of 1.00
Given a string example=”hello” what is the output of example.count(‘l’)
Select one:
a. 0
b. 2
c. 1
d. None
The correct answer is: 0
71 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 91
Not answered
Marked out of 1.00
What will be the output of the following Python code?
example = "helle"
example.rfind("e")
Select one:
a. -1
b. 0
c. 1
d. 4
The correct answer is: 4
72 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 92
Not answered
Marked out of 1.00
What will be the output of the following Python list comprehension?
[j for i in range(2,8) for j in range(i*2, 50, i)]
Select one:
a. Error
b.
[4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 6, 9,
12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48,
10, 15, 20, 25, 30, 35, 40, 45, 12, 18, 24, 30, 36, 42, 48, 14, 21, 28, 35, 42, 49]
c. [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7,
7]
d.
[6, 9, 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 8, 12, 16, 20, 24, 28, 32, 36, 40,
44, 48, 10, 15, 20, 25, 30, 35, 40, 45, 12, 18, 24, 30, 36, 42, 48, 14, 21, 28, 35, 42, 49]
The correct answer is:
[4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 6, 9, 12,
15, 18, 21, 24, 27, 30, 33, 36, 39, 42, 45, 48, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 10, 15,
20, 25, 30, 35, 40, 45, 12, 18, 24, 30, 36, 42, 48, 14, 21, 28, 35, 42, 49]
73 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 93
Not answered
Marked out of 1.00
min(max(False,-3,-4), 2,7) will be
Select one:
a. 2
b. -4
c. FALSE
d. 0
The correct answer is: FALSE
74 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 94
Not answered
Marked out of 1.00
Output of
my_tuple = (1, 2, 3, 4)
my_tuple.append( (5, 6, 7) )
print len(my_tuple)
Select one:
a. 3
b. 2
c. 1
d. ERROR
The correct answer is: ERROR
75 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 95
Not answered
Marked out of 1.00
What will be the output of the following Python code and state the type of copy that is
depicted?
l1=[2, 4, 6, 8] l2=[1, 2, 3] , if I1=l2 then l2 and its type would be
Select one:
a.
•[1, 2, 3], shallow copy
b.
•[2, 4, 6, 8], deep copy
c.
•[2, 4, 6, 8], shallow copy
d.
•[1, 2, 3], deep copy
The correct answer is:
•[1, 2, 3], shallow copy
76 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 96
Not answered
Marked out of 1.00
Predict the output
def f1(x):
global x
x+=1
print(x)
f1(15)
print("hello")
Select one:
a. error
b. 16 hello
c. hello
d. hello 16
The correct answer is: error
77 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 97
Not answered
Marked out of 1.00
What will be the output of the following code
print(type(type(int))
Select one:
a. type 'type'
b. type 'int'
c. 0
d. Error
The correct answer is: type 'type'
78 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 98
Not answered
Marked out of 1.00
Select one:
a. abcd
b. error
c. None
d. ['a','b','c','d']
The correct answer is: abcd
79 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 99
Not answered
Marked out of 1.00
Select one:
a. A
b. a
c. B
d. Error
The correct answer is: A
80 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 100
Not answered
Marked out of 1.00
Select one:
a. 14
b. None
c. 48
d. 64
The correct answer is: 48
81 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 101
Not answered
Marked out of 1.00
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.pop(1)?
Select one:
a.
b.
c.
d.
The correct answer is:
82 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 102
Not answered
Marked out of 1.00
In the code shown, the integer 2 is appended to the list [3,4]. Hence the output of the
code is [3,4,2]. Both the variables a and b are local variables.
Select one:
a. Error
b. [2,3,4]
c. [3,2,4]
d. [3,4,2]
The correct answer is: [3,4,2]
83 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 103
Not answered
Marked out of 1.00
What will be output of following
dict(a=9,b=3)
Select one:
a. Logical Error
b. Error
c.
{'a': 9, 'b': 3}
d.
{'a': 9, 3}
The correct answer is:
{'a': 9, 'b': 3}
84 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 104
Not answered
Marked out of 1.00
for i in (i+5 for i in range(5)):
print(i,end=" ")
Select one:
a.
Error
b.
56789
c.
5 6 7 8 9 10
d.
01234
The correct answer is:
56789
85 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 105
Not answered
Marked out of 1.00
Select one:
a.
86 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
b.
c.
87 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
d.
The correct answer is:
88 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 106
Not answered
Marked out of 1.00
What will be the output after the following statements?
x = [[0.0, 1.0, 2.0],[4.0, 5.0, 6.0]]
y = x[1][2]
print(y)
Select one:
a. 0.0
b. 5.0
c. 1.0
d. 6.0
The correct answer is: 6.0
89 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 107
Not answered
Marked out of 1.00
Read the information given below carefully and write a list comprehension such that
the output is: [‘e’, ‘o’]
w=“hello”
v=(‘a’, ’e’, ’i’, ’o’, ’u’)
Select one:
a.
[x for x in v if w in v]
b.
[x for x in w if x in v]
c.
[x for w in v if x in v]
d.
[x for v in w for x in w]
The correct answer is:
[x for x in w if x in v]
90 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 108
Not answered
Marked out of 1.00
a="this is programming" give output of a[2:5:-1]
Select one:
a. 'ing'
b. 'gni'
c. ' '
d. 'is '
The correct answer is: ' '
91 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 109
Not answered
Marked out of 1.00
Create a list called “Stationery” with the below data
Product = ['Pencil', 'Pen', 'Eraser', 'Pencil Box', 'Scale']
Price= [5, 10, 2, 20, 12]
Brand = ['Camlin', 'Rotomac', 'Nataraj', 'Camel', 'Apsara']
Stationery = [Product, Price, Brand]
Select one:
a. Stationery[0].extend('Notebook')
b. Stationery[0].insert(0,'Notebook')
c. Stationery[0][1] = "Notebook"
d. Stationery[0].append('Notebook')
The correct answer is: Stationery[0].insert(0,'Notebook')
92 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 110
Not answered
Marked out of 1.00
tuple1=(2,4,6,3,7)
tuple2=(1,2,3)
Find out which of the following code does not work on a tuple
Select one:
a. len(tuple)
b. tuple[3] = 45
c. sum(tuple)
d. tuple1+tuple2
The correct answer is: tuple[3] = 45
93 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 111
Not answered
Marked out of 1.00
d = {'foo': 100, 'bar': 200, 'baz': 300} then output of
>>>print( d['bar':'baz']) wil be...
Select one:
a. (200, 300)
b. It raises an exception
c. 200 300
d. [200, 300]
The correct answer is: It raises an exception
94 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 112
Not answered
Marked out of 1.00
def sum(n,fun):
s=0
for i in range(1,n+1):
s=s+fun(i)
return s
def cube(x):
return x*x*x
print(sum(3,cube))
Select one:
a. 49
b. error
c. 8
d. 36
The correct answer is: 36
95 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 113
Not answered
Marked out of 1.00
For dictionary d = {“plum ":0.66, "pears ":1.25,"oranges ":0.50, “apple”:0.75 },
which of the following statement correctly updates
the price of oranges to 0.90?
Select one:
a. d[2] = 0.90
b. d["oranges "] = 0.90
c. d[0.50] = 0.90
d. d["plum "] = 0.90
The correct answer is: d["oranges "] = 0.90
96 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 114
Not answered
Marked out of 1.00
def printme( str ): "This prints a passed string"
print str;
return;
printme( str = "My string");
Select one:
a. My string
b. This prints a passed string
c. Error
d. This prints a passed string My string
The correct answer is: My string
97 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 115
Not answered
Marked out of 1.00
Give output: name[2::-1] if name='Please answer correctly'
Select one:
a. Ple
b. el
c. tly
d. elP
The correct answer is: elP
98 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 116
Not answered
Marked out of 1.00
a = ['foo', 'bar', 'baz', 'qux', 'quux', 'corge']
what will be a[2:-1]
Select one:
a. ['baz', 'qux', 'quux']
b. ['quux','baz','qux']
c. ['quux','qux','baz']
The correct answer is: ['baz', 'qux', 'quux']
99 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 117
Not answered
Marked out of 1.00
list generated by this comprehension :[x+13 for x in range(-2,98,13)]
Select one:
a. [24, 37, 52, 64, 76, 89, 102,11]
b. [24, 37, 50, 63, 76, 89, 102,11]
c. [11, 24, 37, 50, 63, 76, 89, 102]
d. [11, 24, 38, 51, 63, 76, 89, 102]
The correct answer is: [11, 24, 37, 50, 63, 76, 89, 102]
Question 118
Not answered
Marked out of 1.00
Mylist =[‘a’, ‘a’, ‘b’, ‘b’, ‘b’, ‘c’, ‘c’, ‘d’, ‘e’]
The output of the code: Mylist.index(‘d’) is
Select one:
a. 4
b. 8
c. 6
d. 7
The correct answer is: 7
100 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 119
Not answered
Marked out of 1.00
Write output
def mk(x):
def mk1():
print("Decorated")
x()
return mk1
def mk2():
print("Ordinary")
p = mk(mk2)
p()
Select one:
a. Decorated
Ordinary
b. Ordinary
Decorated
c. Ordinary
Ordinary
d. Decorated
Decorated
The correct answer is: Decorated
Ordinary
101 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 120
Not answered
Marked out of 1.00
Read the follwoing: 1.Python Functions can return more than 1 values 2. Python
functions can have variable arguments. State whether above statements are True/False
Select one:
a. Both True
b. Both False
c. 1 False 2 True
d. 1 True 2 False
The correct answer is: Both True
102 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 121
Not answered
Marked out of 1.00
Select the correct statement
Select one:
a. A given object may appear in a list more than once
b. These represent the same list:
['a', 'b', 'c']
['c', 'a', 'b']
c. All elements in a list must be of the same type
d. A list may contain any type of object except another list
The correct answer is: A given object may appear in a list more than once
103 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 122
Not answered
Marked out of 1.00
Select true statement about dictionary
Select one:
a. Items are accessed by their position in a dictionary.
b. Dictionaries are mutable.
c. Dictionary is immutable data type
d. All the keys in a dictionary must be of the same type.
The correct answer is: Dictionaries are mutable.
Question 123
Not answered
Marked out of 1.00
The method to clear all the elements from a Set is:-
Select one:
a. discard( )
b. clear( )
c. remove( )
d. delete()
The correct answer is: clear( )
104 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 124
Not answered
Marked out of 1.00
The method used to increase the length of the list by number of elements in its
argument
Select one:
a. pop()
b. extend()
c. add()
d. insert()
The correct answer is: extend()
105 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 125
Not answered
Marked out of 1.00
The output of the code given below is
list = [2, 4, 6, 8]
a = (x**3 for x in list)
what values will be stored in a
Select one:
a. Error
b. 8
16
24
32
c. None
d. 8
64
216
512
The correct answer is: 8
64
216
512
106 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 126
Not answered
Marked out of 1.00
Variable ‘a’ is defined as
a = ‘gOOd moRning’
Command to convert ‘a’ from ‘gOOd moRning’ to ‘Good Morning’ is:-
Select one:
a. a.string()
b. a.title()
c. a.lower()
d. a.upper()
The correct answer is: a.title()
107 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 127
Not answered
Marked out of 1.00
What will be the output after executing the following codes?
S={12,13,14,15}
S.intersection_update({17,13,14,16}); print(S)
Select one:
a. S={12,13,14,15}
b. S={13,14}
c. S={12,13,14,15,16, 17}
d. Error, object has no attribute intersection_update
The correct answer is: S={13,14}
108 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 128
Not answered
Marked out of 1.00
What will be the output after executing the following codes?
x=(0,8,9,15,17,18)
y=slice(1,-2)
print(x[y])
Select one:
a. (8,9,15,17)
b. (0,8,9,15)
c. (8,9,15)
d. IndexError
The correct answer is: (8,9,15)
109 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 129
Not answered
Marked out of 1.00
What will be the output of the dictionary ‘c’?
c={};
c[1]=1;
c['1']=2;
c[1]+=1;
print(c)
Select one:
a. { 1: 1 }
b. { 1: 2, '1': 2 }
c. { 1: 0; ‘1’: 2 }
d. 1: 1, '1': 2 }
The correct answer is: { 1: 2, '1': 2 }
110 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 130
Not answered
Marked out of 1.00
Which of the following is not a valid syntax for creating a Set ‘M’ in Python?
Select one:
a. M = {11,12,13,14}
b. M = set ([11,12],[13,14],[14,15])
c. M = set ([11,12,12,13,14,15])
d. M = set ((11,12,13,14))
The correct answer is: M = set ([11,12],[13,14],[14,15])
Question 131
Not answered
Marked out of 1.00
Which of the following is not possible in sequence datatypes?
Select one:
a. Create a list inside a set
b. Create a set inside a list
c. Create a list inside a tuple
d. Create a tuple inside a set
The correct answer is: Create a list inside a set
111 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 132
Not answered
Marked out of 1.00
Which of the following python sequence data type is immutable?
Select one:
a. array
b. dictionary
c. list
d. tuple
The correct answer is: tuple
Question 133
Not answered
Marked out of 1.00
Which of the following sequence data type is defined by enclosing the elements in
parentheses ‘()’?
Select one:
a. tuple
b. array
c. dictionary
d. lists
The correct answer is: tuple
112 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 134
Not answered
Marked out of 1.00
Give output
a=9
def f():
a=a+2
print(a)
f()
a=10
print(a)
f()
Select one:
a. Name error
b. Error: local variable 'a' referenced before assignment
c. 9 10
d. 10
The correct answer is: Error: local variable 'a' referenced before assignment
113 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 135
Not answered
Marked out of 1.00
if x = [10, [3.141, 20, [30, 'raz', 3]], 'foo'] write expression with specific index to display
'r' in output using defined list x
Answer:
The correct answer is: x[1][2][1][0]
Question 136
Not answered
Marked out of 1.00
symbol used in function for accepting variable number of arguments
Answer:
The correct answer is:
114 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 137
Not answered
Marked out of 1.00
Set can be nested?
Select one:
True
False
The correct answer is 'False'.
Question 138
Not answered
Marked out of 1.00
Which of these definitions correctly describes a module?
Select one:
a. Denoted by triple quotes for providing the specification of certain program
elements
b. Design and implementation of specific functionality to be incorporated into a
program
c. Any program that reuses code
d. Defines the specification of how it is to be used
The correct answer is: Design and implementation of specific functionality to be
incorporated into a program
115 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 139
Not answered
Marked out of 1.00
Which of the following is not an advantage of using modules?
Select one:
a. Provides a means of testing individual parts of the program
b. Provides a means of reuse of program code
c. Provides a means of reducing the size of the program
d. Provides a means of dividing up tasks
The correct answer is: Provides a means of reducing the size of the program
Question 140
Not answered
Marked out of 1.00
What it is called when a function is defined inside a class?
Select one:
a. method
b. class
c. another function
d. module
The correct answer is: method
116 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 141
Not answered
Marked out of 1.00
Refer the code given below
Select the correct output of program.
Select one:
a. 32
b. Error is generated
c. 32 None
d. 32 32
The correct answer is: Error is generated
117 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 142
Not answered
Marked out of 1.00
for the code given below select the correct output
Select one:
a. Ann Bob
b. Ann Nick
c. Wick Bob
d. Wick Nick
The correct answer is: Wick Nick
118 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 143
Not answered
Marked out of 1.00
Which function overloads the + operator?
Select one:
a. __add__
b. __plus__
c. None of the MENTIONED
d. __sum__
The correct answer is: __add__
119 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 144
Not answered
Marked out of 1.00
which of following operator is overloaded by __inver__()
Select one:
a. ^
b. ~
c. -
d. !
The correct answer is: ~
120 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 145
Not answered
Marked out of 1.00
What will be the output of the following Python code?
Select one:
a. Error, Invalid syntax for object declaration
b. No Error
c. Error, private class members cant be accessed in a subclass.
d. 1
The correct answer is: Error, private class members cant be accessed in a subclass.
121 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 146
Not answered
Marked out of 1.00
Predict the output of following code
Select one:
a. Error
b. 3
122 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
c. Tina
d. Tina chris rob
The correct answer is: 3
123 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 147
Not answered
Marked out of 1.00
How many class and instance variable are present in the code below
Select one:
a. 1,2
b. 2,1
c. 3,0
d. 1,1
The correct answer is: 1,2
124 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 148
Not answered
Marked out of 1.00
Select the correct output
Select one:
a. Hony Green
b. white
c. Green
125 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
d. Black
The correct answer is: Green
Question 149
Not answered
Marked out of 1.00
Select the appropriate output form the code given below.
Select one:
a. 30
b. 40
c. 50
d. 60
The correct answer is: 60
126 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 150
Not answered
Marked out of 1.00
Find the output
Select one:
a. Error
b. 0
c. None of mentioned
d. 1
The correct answer is: 0
127 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 151
Not answered
Marked out of 1.00
Select the appropriate output
Select one:
a. None of the mentioned
b. NIL
c. Error
d. No output
The correct answer is: No output
128 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 152
Not answered
Marked out of 1.00
In case of multiple inheritance, how ambiguity of calling super class constructor is
resolved.
Select one:
a. Error is generated
b. All the super class methods are called
c. Method falling in Depth wise, left to right order is called
The correct answer is: Method falling in Depth wise, left to right order is called
129 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 153
Not answered
Marked out of 1.00
State whether following code is valid or not
Select one:
a. No else cannot be used with except
b. No, else and finally cant be used together
c. No, finally cant be used with except
d. Yes
The correct answer is: Yes
130 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 154
Not answered
Marked out of 1.00
How many Except Statements try-except can have
Select one:
a. More than 1
b. More than zero
c. 1
d. Zero
The correct answer is: More than 1
131 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 155
Not answered
Marked out of 1.00
Select the correct output
Select one:
a. NameError
b. ValueError
c. Same
d. None of mentioned
The correct answer is: ValueError
132 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 156
Not answered
Marked out of 1.00
Select one:
a. 30
b. 10
c. Assertion Error:a is smaller than b
d. 20
The correct answer is: 30
133 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 157
Not answered
Marked out of 1.00
What will be the output of the following Python code?
f = None
for i in range (5):
with open("data.txt", "w") as f:
if i > 2:
break
print(f.closed)
Select one:
a. True
b. Error
c. None
d. False
The correct answer is: True
134 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 158
Not answered
Marked out of 1.00
You write this statement to respond to exceptions
Select one:
a. try/handle
b. run/handle
c. try/except
d. attempt/except
The correct answer is: try/except
Question 159
Not answered
Marked out of 1.00
When an exception is generated, it is said to have been __________.
Select one:
a. Raised
b. Built
c. Caught
d. Killed
The correct answer is: Raised
135 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 160
Not answered
Marked out of 1.00
Select one:
a. abc123
The end.
b. The end.
c. An error happened.
The end.
d. An error happened.
The correct answer is: An error happened.
The end.
136 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 161
Not answered
Marked out of 1.00
Select incorrect exception class
Select one:
a. NameError
b. ZeroDivisionError
c. DevideByZero
d. IOError
The correct answer is: DevideByZero
Question 162
Not answered
Marked out of 1.00
To read all characters from a file object infile, we use
Select one:
a. infile.read(21)
b. infile.read();
c. infile.readline()
d. infile.readlines()
The correct answer is: infile.read();
137 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 163
Not answered
Marked out of 1.00
Using open function with "x" mode will not generate error if file already exist
Select one:
a. True
b. False
The correct answer is: False
Question 164
Not answered
Marked out of 1.00
what will happen if we execute the following instruction: kiet=python
Select one:
a. Type Error
b. Name Error
c. Value Error
d. Syntax Error
The correct answer is: Name Error
138 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 165
Not answered
Marked out of 1.00
Recursion is a method in which the solution of a problem depends on ____________
Select one:
a. Smaller instances of the same problem
b. Larger instances of different problems
c. Larger instances of the same problem
d. Smaller instances of different problems
The correct answer is: Smaller instances of the same problem
139 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 166
Not answered
Marked out of 1.00
Which of the following problems can’t be solved using recursion?
Select one:
a. Nth fibonacci number
b. Length of a string
c. Factorial of a number
d. Problems without base case
The correct answer is: Problems without base case
140 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 167
Not answered
Marked out of 1.00
Which is the most appropriate definition for recursion?
Select one:
a. A function that calls itself
b. An in-built method that is automatically called
c. A class method that calls another class method
d. A function execution instance that calls another execution instance of the same
function
The correct answer is: A function execution instance that calls another execution
instance of the same function
141 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 168
Not answered
Marked out of 1.00
The worst-case occur in linear search algorithm when …….
Select one:
a. Item is somewhere in the middle of the array
b. Item is not in the array at all
c. Item is the last element in the array or item is not there at all
d. Item is the last element in the array
The correct answer is: Item is the last element in the array or item is not there at all
142 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 169
Not answered
Marked out of 1.00
In the following type of searching key-comparisons are needed
Select one:
a. Both
b. None
c. Linear
d. Binary Search
The correct answer is: Both
143 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 170
Not answered
Marked out of 1.00
What is the worst case complexity of selection sort?
Select one:
a. O(n2)
b. O( n logn)
c. O(n)
d. O(logn)
The correct answer is: O(n2)
144 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 171
Not answered
Marked out of 1.00
Merge sort uses which of the following technique to implement sorting?
Select one:
a. Backtracking
b. Greedy
c. Divide and conquer
d. Dynamic Programming
The correct answer is: Divide and conquer
145 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 172
Not answered
Marked out of 1.00
What are python iterators?
Select one:
a. Objects
b. Class
c. Function
d. Structures
The correct answer is: Objects
146 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 173
Not answered
Marked out of 1.00
How many time the for loop in code given below will run
Select one:
a. Infinite
b. 0
c. 1
d. 20
The correct answer is: Infinite
147 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 174
Not answered
Marked out of 1.00
The type of exception raised when for loop reaches end
Select one:
a. EndofLoop
b. No exception is raised
c. StopIteration
d. TerminateLoop
The correct answer is: StopIteration
148 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 175
Not answered
Marked out of 1.00
What statement should be replaced with YYYY to
implement Tower of hanoi problem.
def TowerOfHanoi(n , source, destination,
auxiliary):
if n = = 1 :
print "Move disk 1 from
source" ,source, "to destination" ,destination
return
YYYY
print "Move disk" ,n, "from
source" ,source, "to destination" ,destination
TowerOfHanoi(n - 1 , auxiliary, destination,
source)
Select one:
a.
TowerOfHanoi(n , destination, source, auxiliary )
b.
TowerOfHanoi(n - 1 , source, auxiliary,
destination)
c.
TowerOfHanoi(n - 1 ,auxiliary, source,
destination)
d.
TowerOfHanoi(n - 1 , destination, source, auxiliary )
149 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
The correct answer is:
TowerOfHanoi(n - 1 , source, auxiliary,
destination)
Question 176
Not answered
Marked out of 1.00
What should be repalced with YYYY to complete recursive implementation of Fibonacci
series.
1. def recur_fibo(n):
2. if n <= 1:
3. return n
4. else:
5. YYYY
Select one:
a. return(recur_fibo(n) + recur_fibo(n-1))
b. (recur_fibo(n-1) + recur_fibo(n-2))
c. return(recur_fibo(n-1) + recur_fibo(n-2))
d. (recur_fibo(n-1) + recur_fibo(n-2))
The correct answer is: return(recur_fibo(n-1) + recur_fibo(n-2))
150 of 151 21-Jul-21, 4:04 PM
demoquiz http://moodle.kiet.edu/moodle/mod/quiz/review.php?attempt=61982&c...
Question 177
Not answered
Marked out of 1.00
The last value printed by the code given will be.
Select one:
a. 0
b. 15
c. 14
d. 16
The correct answer is: 16
151 of 151 21-Jul-21, 4:04 PM