reference_point indicates the current position of the file object
reference_point indicates the starting position of the file object
reference_point indicates the ending position of the file object
None of the above
What will be the output of the following code ?
f=open("demo.txt","w+") f.write("Welcome to python") f.seek(5) a=f.read(5) print(a)
Welco
me to
Welcome to Python
e to
Performance
Algorithmic Representation
Evaluation
Flowcharting
What is the output of the following code?
a = {1:"A", 2: "B", 3: "C"} b = {4: "D", 5: "E"} a.update(b) print(a)
{1:’A’, 2: ‘B’,3: ‘C’}
{1: ‘A’, 2: ‘b’, 3: ‘c’, 4: ‘D’, 5: ‘E’}
Error
{4: ‘D’, 5: ‘E’}
What will be the output of the following expression ?
print (7//2) print (-7//2)
3 -3
4 -4
3 -4
3 3
break
pass
continue
None of These
Design
Palnning
Algorithm
Execution
The syntax is: from module name import identifier
This form of import does not import anything
The namespace of imported module becomes part of importing module
The identifiers in module are accessed directly as: identifier
readall()
read()
readcharacter()
readchar()
softspace
mode
closed
rename
What will be the output of the following ?
import numpy as np a = np.array( [2, 3, 4, 5] ) b = np.arange(4) print(a+b)
[2 3 4 5]
[3 4 5 6]
[1 2 3 4]
[2 4 6 8]
16
32
64
eval
nonlocal
assert
finally
.
#
/
?
What value does the following expression evaluate to ?
x = 5 while x < 10: print(x, end='')
Closed loop
one time loop
Infinite loop
Evergreen loop
def function function_name():
declare function function_name():
def function_name():
declare function_name():
23
'2+3'
'23'
What is the output of the following ?
print(int())
Any Random Number
0
1
What does the following code print ?
if 2 + 5 == 8: print("TRUE") else: print("FALSE") print("TRUE")
TRUE
TRUE FALSE
TRUE TRUE
FALSE TRUE
[3, 4, 5, 20, 5, 25, 1, 3]
[1, 3, 3, 4, 5, 5, 20, 25]
[3, 5, 20, 5, 25, 1, 3]
[1, 3, 4, 5, 20, 5, 25]