Detected incorrect number of valid print statements (without f-strings)

Detected incorrect number of valid print statements (without f-strings).

Getting above error while executing test 2 , even tried with F String.

[edited to remove code]

I don’t know the context of this Lab but sometimes the grader expects the written lines in a certain way:

Perhaps try: if book[‘on_shelf’] is True and book[‘on_hold’] is False:

logical operator is required

I think it could be that the grader doesn’t like the space between “print” and the start of the parentheses. You could perhaps try removing the extra space from both lines with the print statement.

1 Like

this worked , thanks bmiveta

2 Likes

I am glad this helped! Just to let you know, I have removed the code from your original post. In future, please only post the error message along with information about what exercise you are referring to, but please do not share code in posts as that is against the forum’s code of conduct. If necessary, a mentor will ask you to send your code in a direct message to them. Thanks!

1 Like