RAM
CPU
ROM
Control Unit
What is the output of the following code?
def s(n1): print(n1) n1=n1+2 n2=4 s(n2) print(n2)
6 4
4 6
4 4
6 6
What is the output of the following?
x=123 for i in x: print(i)
1 2 3
123
Error
none of these
What will be the output of following statement ?
>>>"m"+"n1"
'm+nl'
'mn1'
'm n1'
'm'
Both tuples and lists are immutable
Tuples are immutable while lists are mutable
Both tuples and lists are mutable
Tuples are mutable while lists are immutable
5 characters
5 words
5 lines
None of the above
list
set
tuple
dict
m=0 while m<5: m+=1 if m==3: break else: print(0)
0 1 2 0
0 1 2
0 0 1 0 2
error
What will be output for the following code?
import numpy as np a=np.array([[1,2,3],[0,1,4]]) print (a.size)
1
5
6
4
To make a Matrix with all element 0
To make a Matrix with all diagonal element 0
To make a Matrix with first row 0
k^1
k**1
k^ ^1
k^*1
//
?
<
and
write mode
read mode
append mode
Both (A) And (B)
Numbering Python
Number In Python
Numerical Python
f.reads()
f.read()
f.read(all)
f.read( *)
n=5 while n>0: n-=1 if n==2: continue print(n,end=' ')
5 4 3 1 0
4 3 1 0
4 3 2
Curly Braces
Round Brackets
Indentation
Semicolon
Subtracting two numbers
Comparing two data values
Providing output to the user
Adding two numbers
Java
C
PHP
All of the above
What will be the output of the following Python code?
tuple1=(5,1,7,6,2) tuple1.pop(2) print(tuple1)
(5,1,6,2)
(5,1,7,6)
(5,1,7,6,2)