Hello,
Please can I get a hint in which line I have to look at in order to correct this failure code:
→ 10 compute_cost_test(compute_cost)
Thank you.
Rainer
Hello,
Please can I get a hint in which line I have to look at in order to correct this failure code:
→ 10 compute_cost_test(compute_cost)
Thank you.
Rainer
Hello @Rainer_L_Zettl
posting code here is against community guidelines. Delete the code and post the trace of the error here
Hello,
Please can I get a hint in which line I have to look at in order to correct this failure code:
→ 10 compute_cost_test(compute_cost)
Thank you.
Rainer
Sorry for that.
How can I delet the content of my first questions?
Thank you for your help.
Rainer
@Rainer_L_Zettl
When you run the code, if it is wrong, you will get error message. Post the screenshot of the error message what you are getting. So that mentors can help
Please note still you have not deleted the code from your post. There is a pencil symbol (edit this post ). Click on that so that you can edit(delete the code) in your post
Got it. Thank you very much. Rainer
You haven’t posted the entire assert stack. You only posted the line that throws the assert.
Here is a short primer on accumulating values in Python:
Let’s say you wanted to add 1 to the variable ‘v’.
There are two methods.
One is to use the += operator, as in:
v += 1
The other is to add the value and reassign it:
v = v + 1
If you incorrectly combine these methods…
v += v + 1
Then what you’ve actually done is compute v + v + 1