This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "math" | |
| ) | |
| // Try it online: | |
| // Pre-loaded code: https://go.dev/play/p/k9_k81O4QHr | |
| // Or paste the code yourself: https://go.dev/play/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| import webbrowser | |
| countdown = int(input("Enter the countdown time in seconds: ")) | |
| for i in reversed(range(countdown)): | |
| hour = i // 3600 | |
| minute = (i % 3600) // 60 | |
| second = i % 60 | |
| print(f"Remaining time {hour:02d} : {minute:02d} : {second:02d}") |