Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 3 : Write a function called first _ word that takes a list of character strings as input and returns the first element of
Problem : Write a function called firstword that takes a list of character strings as input and returns the first element of the list in alphabetical order. For
example, your function should work like this:
students Mary 'Zelda', 'Jimmy', 'Jack', 'Bartholomew', 'Gertrude'
firstwordstudents
'Bartholomew' # The result
Hint: You'll need to first sort your list in the function to accomplish this, then identify the first element. Within a function, it is a good idea to use multiple lines of
code to separate out the different steps. Just make sure all the code that belongs to the function is indented!
After you've written the function, run it by supplying the list teams to your function as an argument to test it
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started