12.6
'12.6'
12
Syntax Error
What will be the output of the following code?
f=open("demo.txt","r") print(f.tell())
1
2
-1
0
random
randrange
randomrange
rand
What is the output of the following code ?
import numpy as np a = np.array([[1,2,3]]) print(a.shape)
(2,3)
(3,1)
(1,3)
None of These
def fun(a, b=6): a=a+b print(a) fun(5, 4)
11
9
5
4
Input/Output, Decision, Repeat
Input, Output, Process
Loop, Input/Output, Process
Sequence, Selection, Repeat
set
tuple
string
os.rename(existing_name, new_name)
fq.name = ‘new_name.txt’
os.rename(fp, new_name)
os.set_name(existing_name, new_name)
What will be output for the following code ?
import numpy as np a = np.array([[1, 2, 3],[0,1,4],[11,22,33]]) print (a.size)
3
ms = ('A','D', 'H','U','N','I','C') print(ms[1:4])
(‘D’, ‘H’, ‘U’)
(‘A’, ‘D’, ‘H’,’U’,’N’,’I’,’C’)
(‘D’,’H’,’U’,’N’,’I’,’C’)
write
output
send
dump
Standard Input
Standard Output
Standard Errors
All of the mentioned
Better programming
easy testing and debugging
Efficient Coding
All
User Defined Function
Library Functions
Builtin Functions
All of the above
What will be the output of the following ?
import numpy as np a = np.array([[ 1,2,3,4], [5,6,7,8], [9,10,11,12]]) print(a[2,2])
7
10
8
What is the output of the following statement ?
print ((2, 4) + (1, 5))
(2 , 4), (4 , 5)
(3 , 9)
(2, 4, 1, 5)
Invalid Syntax
pseudo codes
syntax
flowcharts
programs
Numbering Python
Number in Python
Numerical Python
Number for Python
What will be the output of the following Python code?
from math import* print(floor(3.7))
3.0
What is the output of the following code?
import numpy as np a = np.array([1,2,3,5,8]) b = np.array([0,1,5,4,2]) c = a + b c = c*a print (c[2])
6
24
None of these