Python

1
python is _______ language
low level
middle level
high level
complied
2
python is general purpose language?
TRUE
FALSE

3
python treats everything as a _____
file
object
class
variable
4
python is developed by_______
Bill Gates
Guido van Rossum
Steve Jobs
Dennis Richie
5
python is developed at _________
Centrum Wiskunde Informatica
AT AND T LABS
Garage
IBM
6
Python does not have_____ loop
For
While
do…while
nested
7
Python has switch statement to check condition and execute statement when condition is true.
TRUE
FALSE

8
Python has automatic garbage collection.
TRUE
FALSE

9
Extension of python file is .pyc
TRUE
FALSE

10
Python is Multi Paradigm language
TRUE
FALSE

11
Coercion means type conversion
TRUE
FALSE

12
we did not need to declare variable in python as python is _______ language
High level
interpreted
dynamically typed
static type
13
id() method is part of _______ operator
Identity
Membership
bitwise
Boolean
14
(is and not is ) is a ________ operator
membership
bitwise
boolean
identity
15
(in and not in) is a _______ operator
membership
identity
relational
bitwise
16
what will be the output of the following code : print(eval(“5+6*7-5”))
43
45
72
42
17
what will be output of following program: a,b=65,75; b,a=a,b; print(a,b)
65,75
75,65
65,65
75,75
18
what will be output of following code: a=10; print(type(a))
int
float
<class int>
complex
19
In complex type (j) is for?
real part
imaginary part
square root of -1
string
20
size of int in Python is
32767
32768
infiniy
58723
21
_____ is a collection of elements.
variable
object
sequence
class
22
python is developed in year ____
1972
1985
1989
1991
23
python syntax is inspired from
abc
modula3
c
java
24
python’s exception handling feature is inspired from.
abc
modula3
setl
c
25
what will be the output of following code: a=5;b=7; print(a+b)
10
12
57
75
26
what will be output of the following code: a,b=[int(i) for i in input(“Enter two numbers”).split(‘ ‘)); print(“numbers are {0} and {1}”.format(b,a))
Factorial
Fomatted String
Swapping
Infinite numbers
27
what will be the output of following code : a=”Hello”; b=”World”; print(a,b)
HelloWorld
Hello,World
Hello World
Hello. World
28
what will be the output of following code : a=”Hello”; b=”World”; print(a+b)
HelloWorld
Hello+World
Hello World
Hello. World
29
what will be output of following code: print(“hello”*2)
hello*2
hellohello
hello
Error
30
0B10101 number is _____ literals
integer
string
binary
octal
31
what will be the output of following code: a=0B1010 ; print(int(a))
10
20
30
1010
32
____ is one of the python flavour to run c programs in python.
rpython
jython
cpython
rubypython
33
_____ is one of the python flavour to run java programs in python.
jython
javapython
Django
pandas
34
_____ is the one of the python flavour to run multiple threads at a time.
stacklesspython
rubypython
jython
pypy
35
_____ python is redeveloped to handle largescale data.
Pandas
Anaconda
Girrafe
Bear
36
to view bytecode following is the syntax: python -m dis filename.py
TRUE
FALSE

37
Garbage collector classifies the object onto three generations.
TRUE
FALSE

38
which amongst the following sequence can only store positive 0 to 255 .
bytes
list
tuple
sets
39
In python we need to deallocate memory manually Everytime.
TRUE
FALSE

40
_____ is the extension of class file in python which stores bytecode.
.py
.pyc
.pyx
.pypy
41
Constant in python can be identified by_____naming convention.
upper case letters
lower case letters
special symbols
class name
42
python has single line comment starting with hash(#) symbol
TRUE
FALSE

43
” ……..”’ is known as .
multi line comment
docstring
single line comment
Both A and B
44
A set uses ____ braces to enclose its elements.
[]
()
{}
| |
45
A tuple is similar as a list but its elements cannot be modified.
TRUE
FALSE

46
We can use ____function to know the datatype of a variable
int()
float()
type()
id()
47
if a number starts with 0x or 0X then it is considered as hexadecimal number.
TRUE
FALSE

48
PVM is most often called_____
compiler
interpreter
translator
assembler
49
Command line argument are stored as string in ____
arbs
args
argv
argc
50
Command line argument is available in ____ module
sys
pandas
numpy
cmd
51
To find no. of arguments in command line argument which function is used.
sys()
num()
len()
size()

 

 

 

By Deesha

Leave a Reply

Your email address will not be published. Required fields are marked *