can you help me with this question: If I only had a list of arrivals, how do I define a function which returns the name of the guests who are fashionably late. eg: arrivals = ['Adela', 'Fleda', 'Owen', 'May', 'Mona', 'Gilbert', 'Ford'] I can only return Mona, but not Gilbert. Thank you so much sir. Here is my code def late_guests(arrivals): for name in arrivals: if name == arrivals[-1]: return False elif arrivals.index(name) >= len(arrivals)/2: return name
I finally find the answer for this question thanks to this video. Again, thank you sir for such a comprehensive video. Here's my answer: arrivals = ['Adela', 'Fleda', 'Owen', 'May', 'Mona', 'Gilbert', 'Ford'] names = [] def late_guests(arrivals): for name in arrivals: if arrivals.index(name) >= len(arrivals)/2 and arrivals.index(name) < len(arrivals)-1: names.append(name) return names
If you like the videos, please do consider subscribing. It helps me keep motivated to make awesome videos like this one. :)
I don't have words to appreciate you. I liked your way of teaching well abhishek
thank you so much for such exceptional explanation
Thank you so much to take your personal time to explain things in detail
Learn from a best to become a best. hurrah!!!!
what a tutorial :) , awesome Abhishek
Absolutely top class!
One question. When will your second book be available? 😭
Approaching any Nlp problem?
Working on it. Maybe end of 2021
LEARNING EVERYDAY
♥️
Top!
♥️
can you help me with this question: If I only had a list of arrivals, how do I define a function which returns the name of the guests who are fashionably late.
eg: arrivals = ['Adela', 'Fleda', 'Owen', 'May', 'Mona', 'Gilbert', 'Ford']
I can only return Mona, but not Gilbert.
Thank you so much sir. Here is my code
def late_guests(arrivals):
for name in arrivals:
if name == arrivals[-1]:
return False
elif arrivals.index(name) >= len(arrivals)/2:
return name
I finally find the answer for this question thanks to this video. Again, thank you sir for such a comprehensive video. Here's my answer:
arrivals = ['Adela', 'Fleda', 'Owen', 'May', 'Mona', 'Gilbert', 'Ford']
names = []
def late_guests(arrivals):
for name in arrivals:
if arrivals.index(name) >= len(arrivals)/2 and arrivals.index(name) < len(arrivals)-1:
names.append(name)
return names
Do I need to get exactly 0.025 in order for the exercise to be marked as complete?
Sir, I could not understand the question of Short-Planets, will you please explain me in the comment section
Basically you have to just return out the planets whose size is less than 6 (6 characters) in the list planets..