yes
no
machine dependent
none of the mentioned
seed()
sqrt()
factorial()
print()
16
32
64
None of These
Number
String
List
Slice
/
//
#
!
English
PHP
C
All of the above
Pointers
Loops
Dynamic Typing
for
While
do-while
None of these
count()
upper()
strip()
All the above
raise
goto
try
except
.python
.py
.p
.pyt
Union
Intersection
Difference
None of the above
35
29
3
4
5
6
function
def
fun
define
finally
unlimited length
all private members must have leading and trailing underscores
Preferred Installer Program
What is the output of the following program:
print ("Hello World"[::-1])
dlroW olleH
Hello Worl
D
error
strptime()
strftime()
Both A and B
execute python
go python
python
run python
datetime
date
time
timedate
+5
-11
+11
-5
65536
33
169
What will be the datatype of the var in the below code snippet?
var = 10 print(type(var)) var = "Hello" print(type(var))
Str and int
int and int
str and str
int and str
Passing –O when running python
Assertions are disabled by default
Both A and B are wrong
Assertions cannot be disabled in python
Brackets
Indentation
Key
What will be the output of the following code snippet?
a=[1,2,3,4,5,6,7,8,9] a[::2]=10,20,30,40,50,60 print(a)
ValueError: attempt to assign sequence of size 6 to extended slice of size 5
[10, 2, 20, 4, 30, 6, 40, 8, 50, 60]
[1, 2, 10, 20, 30, 40, 50, 60]
[1, 10, 3, 20, 5, 30, 7, 40, 9, 50, 60]
What is the correct command to shuffle the following list?
fruit=['apple', 'banana', 'papaya', 'cherry']
fruit.shuffle()
shuffle(fruit)
random.shuffle(fruit)
random.shuffleList(fruit)
Tuples have structure; lists have an order
Tuples are homogeneous, lists are heterogeneous.
Tuples are immutable, lists are mutable.
All of them
What is the output of the following code:
L=['a','b','c','d'] print ( "".join(L))
Error
None
abcd
[‘a’,’b’,’c’,’d’]
4.5
4.0
i = 0 while i < 3: print (i) i=i+1 print (i+1)
0 2 1 3 2 4
0 1 2 3 4 5
Infinite loop
0 1 2 3
Python Interpreter.
Python compiler
Python Volatile machine
Portable virtual machine
. List is mutable & Tuple is immutable
List is immutable & Tuple is mutable
Both are mutable
Both are immutable
Sequence value pair
Key value pair
Tuple value pair
Record value pair