Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
hangman.py/time.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
24 lines (17 sloc)
649 Bytes
This file contains 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
def time(): | |
import time | |
now = time.strftime("%c") | |
now=print("Tell me the Date,Time and Timezone") | |
## date and time representation | |
print ("Current date & time " + time.strftime("%c")) | |
## Only date representation | |
print ("Current date " + time.strftime("%x")) | |
## Only time representation | |
print ("Current time " + time.strftime("%X")) | |
## Display current date and time from now variable | |
print("Current time %s" % now ) | |
##display the minutes | |
print("current minutes\n"+time.strftime("%M")) | |
##display the time zone | |
print("current time zone is"+time.strftime("%Z")) | |
time() |