What Will Be The Output Of The Following Python Codep Pre #852
What will be the output of the following Python code?</p> <pre><code class="language-python">import time for i in range(0,5): print(i) time.sleep(2)</code></pre>
This multiple choice question (MCQ) is related to the book/course gs gs109 Python. It can also be found in gs gs109 Python Modules - Python Datetime Module - Quiz No.2.
What will be the output of the following Python code?
import time for i in range(0,5): print(i) time.sleep(2)
After an interval of 2 seconds, the numbers 1, 2, 3, 4, 5 are printed all together
After an interval of 2 seconds, the numbers 0, 1, 2, 3, 4 are printed all together
Prints the numbers 1, 2, 3, 4, 5 at an interval of 2 seconds between each number
Prints the numbers 0, 1, 2, 3, 4 at an interval of 2 seconds between each number