Python program to display Good Morning message based in given time.
Note: If user enters time greater than 12 then program will display only "Have a nice time..." message.
time = int(input("Enter your time:"))
if time < 12:
print ("Good Morning...")
print("Have a nice time...")
Output of Program
Enter your time:5
Good Morning...
Have a nice time...
if time < 12:
print ("Good Morning...")
print("Have a nice time...")
Output of Program
Enter your time:5
Good Morning...
Have a nice time...
Note: If user enters time greater than 12 then program will display only "Have a nice time..." message.
No comments:
Post a Comment