main.py155 chars10 linesThis code block uses a while loop and the time module to print out "Hello World" repeatedly for 10 seconds. The start_time variable keeps track of when the loop started running, and the seconds_to_run variable specifies how long the loop should run for. The i variable is a counter that increments with each iteration of the loop, so that the output displays the number of times "Hello World" has been printed.
gistlibby LogSnag