Python Practice Test MCQ Certified Go from 0 to Expert hero Set 23

Which of the following functions does not accept any arguments?


Options are :

  • position
  • fillcolor
  • goto
  • setheading()

Answer :position

What will be the output of the following Python code?


Options are :

  • 300.00, 9.00
  • 9, 300
  • 300, 9
  • 9.00, 300.00

Answer :300.00, 9.00

What will be the output of the following Python code?


Options are :

  • Trapezium
  • Parallelepiped
  • Tetrahedron
  • Star

Answer :Star

Python Certification Exam Preparation Set 7

What will be the output of the following Python functions?


Options are :

  • Error
  • Two triangles, joined by a straight line
  • Two triangles, joined at one vertex
  • Two separate triangles, not connected by a line

Answer :Two triangles, joined at one vertex

What will be the output of the following Python code?


Options are :

  • Error
  • A circle filled in with the colour red
  • A circle filled in with the colour blue
  • A circle filled in with the colour green

Answer :A circle filled in with the colour blue

Which of the following functions can be used to make the arrow black?


Options are :

  • turtle.color(0,1,0)
  • turtle.color(1,0,0)
  • turtle.color(0,0,1)
  • turtle.color(0,0,0)

Answer :turtle.color(0,0,0)

Python Certification Exam Preparation Set 62

What will be the output of the following Python code?


Options are :

  • Blank page
  • A triangle filled in with the colour yellow
  • A triangle which is not filled in with any colour
  • Error

Answer :Blank page

What will be the output of the following Python code?


Options are :

  • A square filled in with the colour green
  • A square outlined with the colour green
  • Blank canvas
  • Error

Answer :Blank canvas

In which direction is the turtle pointed by default?


Options are :

  • North
  • south
  • East
  • West

Answer :East

Python Certification Exam Preparation Set 32

The command used to set only the x coordinate of the turtle at 45 units is:


Options are :

  • reset(45)
  • setx(45)
  • xset(45)
  • xreset(45)

Answer :setx(45)

Which of the following functions returns a value in degrees, counterclockwise from the horizontal right?


Options are :

  • heading()
  • degrees()
  • position()
  • window_height()

Answer :heading()

What will be the output of the following Python code?


Options are :

  • 0.0
  • 90.0
  • 270.0
  • 360.0

Answer :270.0

Python Certification Exam Preparation Set 18

What will be the output of the following Python code?


Options are :

  • Yes
  • True
  • No
  • False

Answer :True

What will be the output of the following Python code?


Options are :

  • 0.00, 90.00
  • 0.00, 0.00
  • 100.00, 90.00
  • 100.00, 100.00

Answer :100.00, 100.00

Which of the following functions results in an error?


Options are :

  • turtle.shape("turtle")
  • turtle.shape("square")
  • turtle.shape("triangle")
  • turtle.shape("rectangle")

Answer :turtle.shape("rectangle")

Python Certification Exam Preparation Set 8

What will be the output of the following Python code?


Options are :

  • A straight line of 100 units tiled at 75 degrees from the horizontal
  • A straight line of 100 units tilted at 15 degrees from the horizontal
  • A straight line of 100 units lying along the horizontal
  • Error

Answer :A straight line of 100 units lying along the horizontal

What will be the output of the following Python code?


Options are :

  • True
  • False
  • Yes
  • No

Answer :False

The function used to alter the thickness of the pen to 'x' units:


Options are :

  • turtle.width(x)
  • turtle.span(x)
  • turtle.girth(x)
  • turtle.thickness(x)

Answer :turtle.width(x)

Python Certification Exam Preparation Set 45

What will be the output of the following Python code if the system date is 18th June, 2017 (Sunday)?


Options are :

  • 0.0
  • 180.0
  • 270.0
  • 360.0

Answer :180.0

What will be the output of the following Python code?


Options are :

  • 0.0
  • Error
  • 100.0, 100.0
  • 100.0

Answer :100.0

The output of the following Python code will result in a shape similar to the alphabet ___________


Options are :

  • V
  • Inverted V
  • X
  • T

Answer :V

Python Certification Exam Preparation Set 36

The output of the following Python code is similar to the alphabet _______________


Options are :

  • X
  • N
  • T
  • M

Answer :T

The following Python code will result in an error.


Options are :

  • True
  • False

Answer :False

What will be the output of the following Python code?


Options are :

  • 0.0
  • 50.0
  • 60.0
  • Error

Answer :60.0

Python Certification Exam Preparation Set 41

What will be the output shape of the following Python code?


Options are :

  • Hexagon
  • Octagon
  • Pentagon
  • Heptagon

Answer :Hexagon

What will be the output of the following Python code?


Options are :

  • user
  • auto
  • nonresize
  • error

Answer :nonresize

The process of pickling in Python includes:


Options are :

  • conversion of a list into a datatable
  • conversion of a byte stream into Python object hierarchy
  • conversion of a Python object hierarchy into byte stream
  • conversion of a datatable into a list

Answer :conversion of a Python object hierarchy into byte stream

Python Practice Test MCQ Certified Go from 0 to Expert hero Set 3

To sterilize an object hierarchy, the _____________ function must be called. To desterilize a data stream, the ______________ function must be called.


Options are :

  • dumps(), undumps()
  • loads(), unloads()
  • loads(), dumps()
  • dumps(), loads()

Answer :dumps(), loads()

Pick the correct statement regarding pickle and marshal modules.


Options are :

  • The pickle module supports primarily .pyc files whereas marshal module is used to sterilize Python objects
  • The pickle module keeps track of the objects that have already been sterilized whereas the marshal module does not do this
  • The pickle module cannot be used to sterilize user defined classes and their instances whereas marshal module can be used to perform this task
  • 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

Answer :The pickle module keeps track of the objects that have already been sterilized whereas the marshal module does not do this

What will be the output of the following Python code?


Options are :

  • 4
  • 5
  • 3
  • 6

Answer :4

Python Certification Exam Preparation Set 65

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions