31 Program illustrating change in time in Python

Program:

#program illustrating change in time



time=float(input("Enter current time:"))



if(time<=12.00):

    print("Good Morning")

elif(time<=16.00):

    print("Good Afternoon")

elif(time<=20.00):

    print("Good Evening")

else:

    print("Good Night")


Output:

Program illustrating change in time in Python

Previous
Next Post »