Académique Documents
Professionnel Documents
Culture Documents
Andhra Pradesh
Python Programming
Max Mark:30 Time:3hrs
L1 = list()
L1.append(1)
L1.append(3)
L1.append(4)
print(L1[0],L1[2])
A.1 4
B.1 3
C.1 4 3
D.1 1
3 What is the output of the following?
i=1
while 1!=5:
if i%7==0:
break
print(i,end=' ')
i=i+1
A.123456
B.13579
C.Error
D.False
4 Which tool is used to create basic GUI in python
A.tkinter
B.Pands
C.Numpy
D.Pypy
5 What Will Be The Output Of The Following Code ?
1
class fruits:
def __init__(self, price):
self.price = price
obj=fruits(50)
obj.quantity=10
obj.bags=2
print(obj.quantity+len(obj.__dict__))
A.12
B.52
C.13
D.60
6 What Will Be The Output Of The Following Code ?
x="hello world"
print(x[1:5])
A.ello
B.Hello
C.ello w
D.dlro
7 num = 3
if num==0:
print(num,"is 3.")
print("1",end='')
num = -1
if num > 0:
print(num,"is -1")
print("2")
2
A.34
B.54
C.30
D.50
11 >>>A=”PYTHON”
>>>type(A)
A.<class 'str'>
B.<class 'int'>
C.<class 'float'>
D.<class 'double'>
12 Python Programming Language was created by
A.Guido Van Rossum
B.G Manish Pandey
C.G Ratankumar Singh
D.G Ameer Jha
13 Python 2 version faces official end-of-life ____ Year
A.2021
B.2020
C.2025
D.2023
14 What does the following code do?
f = open("test.txt")
A.Opens test.txt file for both reading and writing
B.Opens test.txt file for reading only
C.Opens test.txt file for writing only
D.Opens test.txt file in god mode
15 Python is __________ based language
A.Compiler
B.Interpreter
C.Assembler
D.Optimizer
16 What is the maximum possible length of an identifier?
A.Unlimited
B.90
C.45
D.56
17 Which Of The Following Keywords Marks The Beginning Of
Function Block?
A. fun
B. define
C. def
D. function
18 Which Of The Following Enclose The Input Parameters Or
Arguments Of A Function?
A. brackets
B. parentheses
C. curly braces
D. quotation marks
19 Function Header part always should contain____________
3
A. Name of Function
B. Name of Function along with Optional Arguments
C. Only Arguments List
D. Only Function Name
20 Function by default return value is called___________
A. None
B. int
C. double
D. public
7 Write a python program to draw Histogram, Bar Plot and Scatter Plot. 4