def greet(status): #fetch previous date previous_date = get_last_seen() #fetch today's date and store it to database today_date = get_date() update_last_seen(today_date) bot = ad.name m = "Here are a few popular actions." msg = ". Your " + bot + " the Virtual Assistant here. There's a lot I can help with. " + m if previous_date == today_date: output("Welcome back " + status + msg) else: hour = int(get_hours()) if (hour >= 4 and hour < 12): output("Good Morning, " + status + msg) elif (hour >= 12 and hour < 16): output("Good Afternoon, " + status + msg) else: output("Good Evening, " + status + msg) help_greet()
def greet(): #fetch previous date previous_date = database.get_last_seen() #fetch today's date and store it to database today_date = get_date() database.update_last_seen(today_date) if previous_date == today_date: return ("welcome back sir") else: hour = int(get_hours()) if hour >= 0 and hour < 12: return ("Good Morning! sir") elif hour >= 12 and hour < 18: return (" Good Afternoon! sir") else: return (" Good Evening! sir")
def greet(): #fetch previous date previous_date = database.get_last_seen() #fetch today's date and store it to database today_date = get_date() database.update_last_seen(today_date) if previous_date == today_date: output("Welcome back sir") else: hour = int(get_hours()) if hour >= 4 and hour < 12: output("Good Morning, sir ") elif hour >= 12 and hour < 16: output("Good After Noon, sir") else: output("goood evening , sir")
def greet(): #fetch todays date today_date = get_date() database.update_last_seen(today_date) #fetch previous date previous_date = database.get_last_seen() if previous_date == today_date: output("Welcome back ,Sir and i would be happy if Internet connection is available") else: hour = int(get_hours()) if hour >= 4 and hour < 12 : output("Good Morning") elif hour>=12 and hour <16: output("Good Afternoon") else: output("Good Evening")