L1/10

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.

python
print(len("shield"))

Here is what the example does:

  • print(len('shield')) runs len('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:

text
5

Be very careful with capitalization, spaces, and line breaks. The output must match exactly.