What will be the output of the following Python code, if the time module has already been imported?
def num(m):
t1 = time.time()
for i in range(0,m):
print(i)
t2 = time.time()
print(str(t2-t1))
num(3)
def num(m):
t1 = time.time()
for i in range(0,m):
print(i)
t2 = time.time()
print(str(t2-t1))
num(3)A. 1
2
3
The time taken for the execution of the code
B. 3
The time taken for the execution of the code
C. 1
2
3
UTC time
D. 3
UTC time
Answer: Option A

Join The Discussion