Question 1 of 25
Hints left: 3
Q1
What will be the output of the following Python code if the system date is 18th June, 2017 (Sunday)? import turtle t=turtle.Pen() t.goto(100,0) t.towards(0,0)
Q2
Which of the following is equivalent to random.randrange(3)?
Q3
What will be the output of the following Python code? import sys sys.stdin.readline() Examveda
Q4
What will be the output of the following Python code? import turtle t=turtle.Pen() t.color(0,0,1) t.begin_fill() t.circle(15) t.end_fill()
Q5
What will be the output of the following Python code? import turtle t=turtle.Pen() t.backward(100) t.penup() t.right(45) t.isdown()
Q6
What will be the output of the following Python code? import datetime d=datetime.date(2016,7,24) print(d)
Q7
What will be the output of the following Python code? #mod1 def change(a): b=[x*2 for x in a] print(b) #mod2 def change(a): b=[x*x for x in a] print(b) from mod1 import change from mod2 import change #main s=[1,2,3] change(s)
Q8
What will be the output of the following Python code? import time time.time()
Q9
How can you uninstall a Python module using pip?
Q10
What will be the output of print(math.factorial(4.5))?
Q11
Which of the following functions can be used to read data from a file using a file descriptor?
Q12
Which of the following will never be displayed on executing print(random.choice({0: 1, 2: 3}))?
Q13
What is x if x = math.isfinite(float('0.0'))?
Q14
Which of the following is true about top-down design process?
Q15
The function random.randint(4) can return only one of the following values. Which?
Q16
Which of the following functions is not defined under the sys module?
Q17
What is the value of x if x = math.factorial(0)?
Q18
The copy module uses the . . . . . . . . protocol for shallow and deep copy.
Q19
What is the result of math.trunc(3.1)?
Q20
How can you create your own module in Python?
Q21
What will be the output of the following Python code? import sys sys.stderr.write(“hello”)
Q22
What will be the output of the following Python code if the system date is 18th August, 2016? tday=datetime.date.today() print(tday.month())
Q23
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(_____)
Q24
Point out the error (if any) in the code shown below if the system date is 18th June, 2017? tday=datetime.date.today() bday=datetime.date(2017,9,18) till_bday=bday-tday print(till_bday)
Q25
What will be the output of the following Python code? import random random.choice(2,3,4)