Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Course: BSC - It Sem Iii: Midterm Examination August 2019

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

VIDYALANKAR SCHOOL OF INFORMATION TECHNOLOGY

Midterm Examination August 2019


Jr. Supervisor Signature -> Roll No =>

Course: BSc.IT Sem III Subject: Python Programming


Date: 26/08/2019 Time: 20 Min Total Marks: 20 Marks
Set – R Examiner Signature: Marks Obtained:

Instructions:
1. This paper consists of 20 multiple choice type questions.
2. Each question has four alternative responses.
3. Please tick mark √ on the correct response against each option number.
4. Rough work is to be done on blank paper which will be provided at the time of exam.
5. All questions are compulsory and each question carries one mark.

Q1 Which of the following statements is true? 01


A. Python is a high level programming B. Python is an interpreted language
language
C. Python is an object-oriented D. All of these
language
Q2 Which is the correct operator for power(x,y)? 01
A. x^y B. x**y
C. x^^y D. None of the mentioned
Q3 Which operator is used in Python to import all functions from modules? 01
A. * operator B. . operator
C. - operator D. , operator
Q4 What is used to define a block of code (body of loop, function etc.) in Python? 01

A. Curly braces B. Parenthesis

C. Indentation D. Quotation
Q5 Which of these is not a core datatype? 01
A. Lists B. Dictionary
C. Tuples D. Class
Q6 What is the use of the return statement? 01
A. exit a function B. null value
C. initiate a function D. none
Q7 What is the output of the following code? 01
numbers = [2, 3, 4]
print(numbers)
A. 2, 3, 4 B. 2 3 4
C. [2,3,4] D. [2 3 4]
Q8 What will be the output of str[0:4] if str="Hello"? 01
A. "Hello" B. "H"
C. "Hel" D. "Hell"
Q9 What is the order of precedence in python? 01
i) Parentheses
ii) Exponential
iii) Division
iv) Multiplication
v) Addition
vi) Subtraction
A. i,ii,iii,iv,v,vi B. ii,i,iii,iv,v,vi
C. ii,i,iv,iii,v,vi D. i,ii,iii,iv,vi,v
Q10 What is the output of the following code ? 01
example = "snow world"
example[3] = 's'
print (example)
A. snow B. snow world
C. Error D. snos world
Q11 What is the output of the following? print('11e'.isnumeric()) 01
A. True B. False
C. None D. Error
Q12 What is the output of this expression, 3*1**3? 01
A. 27 B. 9
C. 3 D. 1
Q13 Which of the following is an invalid statement? 01
A. abc = 1,000,000 B. a b c = 1000 2000 3000
C. a,b,c = 1000, 2000, 3000 D. a_b_c = 1,000,000
Q14 What is the value of the following expression? 01
24//6%3, 24//4//2
A. (1,3) B. (0,3)
C. (1,0) D. (3,1)
Q15 Out of list and tuples which are mutable 01
A. list B. tuples
C. Both are mutable D. Both are not mutable
Q16 What is the output of the following? 01
string = "my name is x"
for i in string.split():
print (i, end=", ")
A. m, y, , n, a, m, e, , i, s, , x, B. m, y, , n, a, m, e, , i, s, , x
C. my, name, is, x, D. error
Q17 Select the reserved keyword in python 01
A. else B. import
C. raise D. All of these
Q18 What is the output of below code: 01
s='cppbuzz chicago'
print(s[3:5])
A. pbuzz B. buzzc
C. bu D. None of these
Q19 Which operators cannot be used with strings 01
A. + B. :
C. * D. **
Q20 What is the output when following code is executed 01
>>>str1="helloworld"
>>>str1[::-1]
A. dlrowolleh B. hello
C. world D. helloworld

You might also like