141. The output of the following Python code will result in a shape similar to the alphabet ___________
import turtle
t=turtle.Turtle()
t1=turtle.Turtle()
t.left(45)
t1.left(135)
t.forward(100)
t1.forward(100)
a) V
b) Inverted V
c) X
d) T
142. The output of the following Python code is similar to the alphabet _______________
import turtle
t=turtle.Pen()
t1=turtle.Pen()
t2=turtle.Pen()
t.forward(100)
t1.forward(100)
t2.forward(100)
t1.left(90)
t1.forward(75)
t2.right(90)
t2.forward(75)
a) X
b) N
c) T
d) M
143. The following Python code will result in an error.
import turtle
t=turtle.Pen()
t.speed(-45)
t.circle(30)
a) True
b) False
144. What will be the output of the following Python code?
import turtle()
t=turtle.Pen()
t.goto(50,60)
t1=t.clone()
t1.ycor()
a) 0.0
b) 50.0
c) 60.0
d) Error
145. What will be the output shape of the following Python code?
import turtle
t=turtle.Pen()
for i in range(0,6):
t.forward(100)
t.left(60)
a) Hexagon
b) Octagon
c) Pentagon
d) Heptagon
146. What will be the output of the following Python code?
import turtle
t=turtle.Pen()
t.resizemode(“sanfoundry”)
t.resizemode()
a) user
b) auto
c) nonresize
d) error
147. The process of pickling in Python includes:
a) conversion of a list into a datatable
b) conversion of a byte stream into Python object hierarchy
c) conversion of a Python object hierarchy into byte stream
d) conversion of a datatable into a list
148. To sterilize an object hierarchy, the _____________ function must be called. To desterilize a data stream, the ______________ function must be called.
a) dumps(), undumps()
b) loads(), unloads()
c) loads(), dumps()
d) dumps(), loads()
149. Pick the correct statement regarding pickle and marshal modules.
a) The pickle module supports primarily .pyc files whereas marshal module is used to sterilize Python objects
b) The pickle module keeps track of the objects that have already been sterilized whereas the marshal module does not do this
c) The pickle module cannot be used to sterilize user defined classes and their instances whereas marshal module can be used to perform this task
d) The format of sterilization of the pickle module is not guaranteed to be supported across all versions of Python. The marshal module sterilization is compatible across all the versions of Python
150. What will be the output of the following Python code?
pickle.HIGHEST_PROTOCOL
a) 4
b) 5
c) 3
d) 6