Introduction to Python Python Quiz
1 Which of the following Python Programming features are TRUE?
i)ItisDynamicallytyped language
i)It Doesnt have data type concept at all
) It is an interpreted language
ivIt supports extensive libraries
,iv
iiv
Liii,iv
Vievw explanation
Jction to Python Python Quiz I
Analyze the following statements regarding Python Program execution process:
2 i)Thestandard implementation of Python is called cpython.
1i)Python coverts its code to machine code, whichis understood by Hardware
lii)Python virtual machine executes the
ijii
ii,ii
View explanation
n Data Science CourseContent
oduction to Python Python Quiz I
3 Consider the below statements regarding Naming Convention of Identifiers
i) ldentifiers can start only with alphabets and digits
ii) underscore is allowed anywhere in an identifier.
iii) Special characters are not allowed at the beginning, but in other pl
iii
ii,i
O View explanation
roduction to Python Python Quiz
5 Predict the output of the below code snippet.
x=Edureka
if(type(x) is str):
X=X++"rocks # Line 3
print(hello)
else:
X=x++Python
break # Line 7
print(hi)
print(x)
Syntax Error at Line 3
Syntax Error at Line 7
hello
Edureka rocks
roduction to Python Python Quiz I
7 Predict the output:
i=15
for i in range(1,5)
while(i<3)
print(hi)
i+1
continue
print(i)
pass
print()
hi
hi
hi
hi
hi
hi
CourseContent
Data Science
My Classroom
= Introduction to Python Python Quiz
ICUTUL LIICULLU
for i in range(1,3):
if(962--0)
forj in range(i,2)
print(hi')
else
print(hello)
else
for j inrange(i,3):
pass
else
print(i)
1
hi
hello
hello
Introduction to Python Python Quiz I
IcuUL UIC UuLpUL
a=10
b="10
C=10.0
print((a-=b) and (a is c))
print((a==C) and (b is c))
True
False
False
True
True
True
False
False
O View explanation
om Data Science CourseContent
troduction to Python Python Quiz
10 Which of the folowing statements are TRUE with respect to Command line Parameters:
.argv refers tothe number ofarguments passed
i os.argy is thelist ofcommand linearguments
Only i
Only i
Both i and ii
Neither i nor ii
O View explanation
CourseContent
Data Science
duction to Python Python Quiz I
4 Predict the output
x=10
if(x>5 and x<9):
print(hi)
X+=1
elif(x>=10 and x<15)
print(hello)
X+=1
elif(x>9 and x<=20):
print(python')
Xt=1
print(x)
python
11
hello
python
12
e Classroom| Edureka x +
CAlearning-tnsdc.edureka.co/classroom/quiz/4/161/1722?tab=CourseContent
assroom Data Science CourseContent
Introduction to Python Python Quiz
X1
elif(x>9 and x<=20)
print(python')
X+1
print(x)
Python
11
hello
Python
12
Error else block is missing
hello
11
KO View explanation
room Data Science CourseContent
Introduction to Python Python Quiz
6 Predict the output
XTrue
y-5
while (x):
while(y-1)>0);
print(x,y)
break
continue
print(hello)
X=False
rintEnd
TIUe 2
True True 5
True 4
True3
True 2
True 1
hello
End
True 5
hello
End
True 5 infinite times
Mark for Review
Type here to search