top of page
learn_data_science.jpg

Data Scientist Program

 

Free Online Data Science Training for Complete Beginners.
 


No prior coding knowledge required!

Writer's pictureJan Daniel Gonzalvo

Simple AI Greeter using Datetime and String Formatting

Ever wanted to have a personal AI greet you depending on what time it is? You can do it now with simple string formatting and little bit of python code!


We first import the necessary libraries!

# Import datetime 
from datetime import datetime
import datetime as dt

Then we assign the current date to the variable get_date


# Assign date to get_date
get_date = datetime.now()

Now we have to map a dictionary for words our AI is going to say. W