111. Which of the following returns a string that represents the present working directory?
a) os.getcwd()
b) os.cwd()
c) os.getpwd()
d) os.pwd()
112. What does os.link() do?
a) create a symbolic link
b) create a hard link
c) create a soft link
d) none of the mentioned
113. Which of the following can be used to create a directory?
a) os.mkdir()
b) os.creat_dir()
c) os.create_dir()
d) os.make_dir()
114. Which of the following can be used to create a symbolic link?
a) os.symlink()
b) os.symb_link()
c) os.symblin()
d) os.ln()
115. What will be the output shape of the following Python code?
import turtle
t=turtle.Pen()
for i in range(0,4):
t.forward(100)
t.left(120)
a) square
b) rectangle
c) triangle
d) kite
116. The number of lines drawn in each case, assuming that the turtle module has been imported:
Case 1:
for i in range(0,10):
turtle.forward(100)
turtle.left(90)
Case 2:
for i in range(1,10):
turtle.forward(100)
turtle.left(90)
a) 10, 9
b) 9, 10
c) 9, 9
d) 10, 10
117. The command which helps us to reset the pen (turtle):
a) turtle.reset
b) turtle.penreset
c) turtle.penreset()
d) turtle.reset()
118. Fill in the blank such that the following Python code results in the formation of an inverted, equilateral triangle.
import turtle
t=turtle.Pen()
for i in range(0,3):
t.forward(150)
t.right(_____)
a) -60
b) 120
c) -120
d) 60
119. What will be the output shape of the following Python code?
import turtle
t=turtle.Pen()
for i in range(1,4):
t.forward(60)
t.left(90)
a) Rectangle
b) Trapezium
c) Triangle
d) Square
120. What will be the output of the following Python code?
import turtle
t=turtle.Pen()
for i in range(0,4):
t.forward(100)
t.left(90)
t.penup()
t.left(90)
t.forward(200)
for i in range(0,4):
t.forward(100)
t.left(90)
a) Error
b) 1 square
c) 2 squares, at a separation of100 units, joined by a straight line
d) 2 squares, at a separation of 100 units, without a line joining them