NameError for book_title in Exercise 1A Module 1

I’m receiving a NameError per below. I’ve run the Import code at the start of the assignment. I’ve re-written the book_title code line a number of times to make sure I don’t have some hidden syntax error. I can’t figure it out. Is this an Import problem?


NameError Traceback (most recent call last)
Cell In [9], line 2
1 # Test your code!
----> 2 test_your_code.exercise_1a(book_title, author, year_published, available_copies)

NameError: name ‘book_title’ is not defined

And following this Exercise 1B is also returning this error:

Test your code!

test_your_code.exercise_1b()

Failed test case: There was no output for exercise 1b cell, check that you run it.
Grader expected: An output generated from print statements
You got: None

Never mind - user error! I figured it out. - Restart Kernel then re-run cells in correct order.

3 Likes