C1M1_Assignment Exercise 3 error

Hello, I’m struggling with Exercise 3 in the Module 1 assignment. I keep tinkering with the code but continue to get errors including “str is not callable.” Pics of the errors are attached. Any advice? Thank you!

Screenshot 2026-03-08 at 2.30.39 PM

Screenshot 2026-03-08 at 2.30.23 PM

“str is not callable” typically means you have added a set of parenthesis to a variable name, instead of a function name.

So this would be OK:

my_text = "Hello"
print(my_text)

…but this would not.
my_text()

Tip: Every time you open a notebook, be sure you run all of the cells starting from the top.
This gets your workspace configured correctly.

Thank you! Looks like just refreshing it and running all of the cells from the top did it. Thanks so much.

1 Like