DAY 15(CODE INFINITY)
Good evening,
Like I am greeting you all after seeing time in my clock computer can also do so if you give him right commands in his language .We have clock , for providing clock to computer we have to import time so Let's get started...
# Greet people according to time
import time
timestamp=time.strftime('%H:%M:%S')
print(timestamp)
timestamp=int(time.strftime('%H'))
if (0<timestamp<12):
print("Good Morning")
elif(12<timestamp<17):
print("Good Afternoon ")
elif(17<timestamp<20):
print("Good Evening")
else:
print("Good Night")
Screenshot of the repel :
![]() |
Link of repel:
https://replit.com/@shwetaantil97/time#main.py
Comments