(Solution code removed, as posting it publicly is against the honour code of this community, regardless if it is correct or not. You can share the errors you get)
Failed test case: Missing correct printed message.
Grader expected: One copy of Brave New World checked out. There are now 3 copies available.
You got: an incorrect message
Exercise 3 has passed. What am I missing in exercise 2??
This is time sensitive as the due date is 11:59 cst 12/22 and it is currently 9:05.
The instructions state the following:
Write a program that:
Reduces the number of available_copies by 1 (representing a book being checked out).
The current available_copies for the book “Brave New World” are 4.
Does not reduce the number of copies?
I updated the the code so that:
(Solution code removed, as posting it publicly is against the honour code of this community, regardless if it is correct or not. You can share the errors you get)
and got the following output:
One copy of Brave New World checked out.
There are now 3 copies available.
and the same error:
Failed test case: Missing correct printed message.
Grader expected: One copy of Brave New World checked out. There are now 3 copies available.
You got: an incorrect message
can you provide me the link here to the lesson here, so I can check the overall codes. Also I was mentioning to assign available copies =1 and then run, what output does it give them?
Here is the exercise description followed by the code snippet . I have included the error returned after I run the code.
Your Task:
Write a program that:
Reduces the number of available_copies by 1 (representing a book being checked out).
The current available_copies for the book “Brave New World” are 4.
(Solution code removed, as posting it publicly is against the honour code of this community, regardless if it is correct or not. You can share the errors you get)
One copy of Brave New World checked out.
There are now 3 copies available.
# Test your code!
test_your_code.exercise_2(available_copies)
Failed test case: Missing correct printed message.
Grader expected: One copy of Brave New World checked out. There are now 3 copies available.
You got: an incorrect message
you were suppose to reduce the available copies with statement function were available copies is a tuple value of a dictionary book title, so using just a numerical value will not change the value of available copies.
first use def statement to mention what is available copies (tuple value) in relation to the dictionary (book title), then to the iteration reduce the tuple value of available copies. Another approach is conversion of tuple into list in relation to the dictionary,and then reducing the tuple value using value item( )
I trust you when you say you do not have access however how are you to offer support without it? If you did, you would note that the lesson format does require me to reduce the available copies with statement function were available copies is a tuple value of a dictionary book title and to use def statement to mention what is available copies (tuple value) in relation to the dictionary (book title), then to the iteration reduce the tuple value of available copies.
Who can look into what appears to be a bug in this lesson?
Let me know who I can send screen grabs of the entire jupter notebook page to.
You have to follow this and increment the value by 1, not put it 3 directly.
Later, you did follow this instruction, but you got the error because your output, which is
is in 2 lines. If you look at the expected output of this exercise, everything is in 1 line (this is why the error is telling you You got: an incorrect message)
Please make sure you follow the formats of all of the expected outputs, including periods (.)