Eli Lilly and Company interview question

Python Code (it was pretty easy)