Question
What is the output of the following 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)
Answer: Option A
Was this answer helpful ?
The code shown above will return the numbers 1, 2, 3, followed by the time taken in the execution of the code. Hence option (a) shows the output correctly.
Was this answer helpful ?
More Questions on This Topic :
Question 6. What does os.getlogin() return? ....
Submit Solution