I am programming in Python, and I came to this exercise:
print("")
print("Function: get_first_letter")
def get_first_letter(the_str):
pass
I am supposed to find the first letter a provided string “The king granted them” but I don’t see any “=” sign which is how I’ve done it before, how do I do this?
I am supposed to add my code where it says “pass” (as far as I know), I have tried replacing it with:
print(get_first_letter[0])
# I've also tried
get_first_letter(the_str[0])
# I get errors in both cases or the program to check if it's correct doesn't recognize my answer.
I’ve tried changing the brackets position as well just in case, and I’ve tried to place that same piece of code under the “check_that_these_are_equal” query as well, but everything results in an error.
How can I solve this exercise?
Alejandro Falcon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
4