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)
What is the output of the following code ?
ms = ('A','D', 'H','U','N','I','C') print(ms[1:4])
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])
What is the output of the following statement ?
print ((2, 4) + (1, 5))
What will be the output of the following Python code?
from math import* print(floor(3.7))
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])
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)
a = {1:"A", 2: "B", 3: "C"} b = {4: "D", 5: "E"} a.update(b) print(a)
What will be the output of the following expression ?
print (7//2) print (-7//2)
import numpy as np a = np.array( [2, 3, 4, 5] ) b = np.arange(4) print(a+b)
What value does the following expression evaluate to ?
x = 5 while x < 10: print(x, end='')
What is the output of the following ?
print(int())
What does the following code print ?
if 2 + 5 == 8: print("TRUE") else: print("FALSE") print("TRUE")
print(5 + 8 * ((3*5)-9)/10)
import numpy as np print(np.maximum([2, 3, 4], [1, 5, 2]))
What will be the output of the following expression?
a = 2 b = 8 print(a|b ) print(a >> 1)
def disp(*arg): for i in arg: print(i) disp(name="Rajat", age="20")
x = 50 def func (x): x = 2 func (x) print ('x is now', x)
import numpy as np a = np.array([1, 5, 4, 7, 8]) a = a + 1 print(a[1])
import numpy as np a = np.arange(1,5,2) print(a)
import numpy as np a = np.arange(5,1) print(a)
import numpy as np a = np.arange(1,3,.5) print(a)
import numpy as np a=np.array([2,4]) b=np.array([3,5]) c=a*b print(c)
import numpy as np a=np.array([2,4,1]) b=np.array([3,5]) c=a+b print(c)
import numpy as np a=np.array([2,4,1]) b=a a[1]=3 print(b)
import numpy as np a=np.array([2,4,1]) b=a.copy() a[1]=3 print(b)
What will be the output of following Python code?
import numpy as np a = np.array([(10,20,30)]) print(a.itemsize)
What is a correct syntax to print the number 8 from the array below:
arr = np.array([[1,2,3,4,5], [6,7,8,9,10]])
What is a correct syntax to print the numbers [3, 4, 5] from the array below:
arr = np.array([1,2,3,4,5,6,7])
Which syntax would print the last 3 numbers from the array below:
Which syntax would print every other item from the array below:
What will be output for the following code?
import numpy as np ary = np.array([1,2,3,5,8]) ary = ary + 1 print (ary[1])
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])
what is the output of the following code?
M=['b' *x for x in range(4)] print(M)
What is the output of the following?
print(max([1, 2, 3, 4.] [4, 5, 6], [7]))
example = "helle" print(example.rfind("e"))
What will be the output of the following pseudo code?
Integer a,b set a=10,b=5 a=a mod(a-6) b=b mod(b-2) print a-b
What is the value of the following Python code?
>>>print(36 / 4)
What is the output of following Python code?
>>print(5*(2//3))
a=set('abc') b=set('cdef') print(a&b)
What will be the output of the following python code?
from math import * floor(11.7)
What will be the output of the following?
print(sum(1,2,3))