anywhere in between the file
End
beginning
second line of the file
from package import all
from package import *
from package include all
from package include*
What will be the output of the following code snippet?
numbers = (4, 7, 19, 2, 89, 45, 72, 22) sorted_numbers = sorted(numbers) odd_numbers = [x for x in sorted_numbers if x% 2!=0] print(odd_numbers)
[7, 19, 45, 89]
[2, 4, 22, 72]
[4, 7, 19, 2, 89, 45, 72, 22]
[24, 7, 19, 22, 45, 72, 89]
Integer a, b, c Set b= 5, a = 1 c= a & b Print c
1
3
5
7
Choose the correct function declaration of fun1() so that we can execute the following two function calls successfully.
fun1(25, 75, 55) fun1(10, 20)
def fun1(**kwargs)
def fun1(args*)
No, it is not possible in Python
def fun1(*data)
Compiler
Interpreter
Assembler
None of these
What will be the output of the following Python code?
x='abcd' for i in x: print(i.upper())
a BCD
abcd
error
A B CD
import
include
both (A) and (B)
none of the above
What will be the output of the following expression
x=14 print(x>>2)
14
2
factorial()
print()
seed()
sqrt()
_x=2
x=3
_xyz_=5
get()
seek()
tell()
cur()
Provides a means of reuse of program code
Provides a means of dividing up tasks
Provides a means of reducing the size of the program
Provides a means of testing individual parts of the program
What is the datatype of x ?
import numpy as np a=np.array([1,2,3,4]) x=a.tolist()
int
array
tuple
list
Testing
Delivery
Idea
Development
arrow
circle
box
parallelogram
f.seek(-10, 0)
f.seek(10, 0)
f.seek(-10,1)
What is the output of the following code snippet?
print([i.lower() for i in "HELLO"])
hello
['h', 'e', 'l', 'l', 'o']
hel
HELLO
What will be the output of following?
Y=[2,5J,6] Y.sort()
[2,6,5J]
[5J,2,6]
Error
[6,5J,2]
What is the output of the following code?
import numpy as np a=np.array([1,2,3,5,8]) b=np.array([0,3,4,2,1]) c=a+b c=c*a print(c[2])
10
21
12
28