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
2 3 -3 3.3
3 4 -3 3
2 3 -3 3
2 3 -3 -3.3
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
1
3
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
break
pass
continue
none of these
Which of the following error is returned by the given code ?
f = open("test.txt","w") f.write(345)
Syntax Error
Type Error
String Error
Run Time Error
What will be the output of the following algorithm for a=5, b-8, c=6 ?
Step 1: Start Step 2: Declare variables a, b and c. Step 3 Read variables a, b and c. Step 4: If a < b If a <c Display a is the smallest number. Else Display c is the smallest number. Else If b <c Display b is the smallest number. Else Display c is the smallest number Step 5:Stop
a is the smallest number
b is the smallest number
c is the smallest number
stop