Please help me on below error

below is error, it looks like there is error in funcation itself

NameError                                 Traceback (most recent call last)
Cell In [12], 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

1 Like

Tip: Every time you open a notebook, you have to run all of the cells starting from the top.

That’s where the assets are imported and the workspace is configured.

Perhaps this will help.

1 Like

my output is matching, however see below error, please help me understnd below error

Failed test case: Detected incorrect number of valid print statements with f-strings.
Grader expected: 4
You got: 3

1 Like

Try a forum search for the term “valid print statements”, I think you’ll find an answer posted by other learners.

Sure, thanks. i am checking

1 Like

Please my result and the expected result, its matching still i am getting error.

Title: Brave New World
Author: Aldous Huxley
Published: 1932
Available Copies: 4


#### Expected Output:
​
```
Title: Brave New World
Author: Aldous Huxley
Published: 1932
Available Copies: 4
```

Sorry, but I’m not a mentor for that course, so I can’t answer specific questions about the grader’s tests.

no worries, thanks anyway. How do i find my mentor?

You’ll need to wait for a mentor for that course to reply here.

@community-team, can you help with this?

Thanks a ton. i will wait.

1 Like

Hi. Did you use an f-string for all the four? Initially, it said book_title was not defined and then it changed to f-strings.

This means you need four print statements with f-strings. Each of your print statement should have something like f”{title}”. It says you have 3 instead of 4. Check for the f-string you missed. I had that problem while I was checking out the exercise.

Just that I do not have access to the notebooks at the moment as I am not a mentor for the course.

1 Like

Thank you, i added 5th f string and it solved the problem, somehow it was not recognizing 4th f string so i added 5th f string and it worked.

2 Likes