Step 10: After the completion of the loop, we will print “Fire in the hole” to signify the end of the countdown.Step 9: Now decrement time so that the while loop can converge.Step 8: The time.sleep() is used to make the code wait for one sec.Step 7: Using end = ‘\r’ we force the cursor to go back to the start of the screen (carriage return) so that the next line printed will overwrite the previous one.Step 6: Now print the minutes and seconds on the screen using the variable timeformat.Step 5: Use divmod() to calculate the number of minutes and seconds. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |