Calling a Built-in Function
A function is a named tool that does a job for you. Python already comes with many built-in functions, so you can start using them right away.
print(len("shield"))Here is what the example does:
print(len('shield'))runslen('shield')and displays the returned value.
The assignment changes the specific values, but the basic pattern is the same.
Assignment
Complete the starter code so the program does the following:
- Print the result of
len('sword').
Your finished program should print exactly this output:
5Be very careful with capitalization, spaces, and line breaks. The output must match exactly.