Module # must be added in the tags option of the post. (ex: Module-1)
Link to the classroom item you are referring to:
Description (include relevant info but please do not post solution code or your entire notebook)
Good day all, busy with the first assignment however having difficulty to set the variant for exercise 2 to checking out the book which should give available copies as 3. Can someone please help and explain where is my mistakes as the variants will not create so that I can reduce the number of books from 4-1=3 available copies.
Hello! It seems like you’re almost there. The task involves adjusting the value of available_copies to reflect that one book has been checked out. To do this, think about how you would update a number to reflect a change reducing the total, a subtraction.
Take a moment to review how variables are updated in Python. Are you applying the change directly to available_copies? Look into whether your approach ensures the value is both updated and stored correctly in the same variable.
I tested, to see if I was able to set up the variable and did not allow the test figure hence trying to adjust the current value of available_copies did not allow the code to do so? I opted various versions to amend the value without any success. Where am I going wrong?
Remember to run the notebook from the start when you work on it. so the variable available_copies is initialized to its value (full stock). It’s important not to modify this directly, as it is required for the program to work correctly. Apply the subtraction operation to the variable that holds the value, not the number itself.