but in the init func we didn’t use the self on a and b after we unpacked them. can i know why ? def __init__(self, *args): super().__init__(*args) a, b, c = self.coefficients.values() self.delta = b**2 - 4 * a * c
Please open a new thread for your question
In the future, please create your own topic when you have specific questions about your own challenge code. Only respond to another thread when you want to provide help to the original poster of the other thread or have follow up questions concerning other replies given to the original poster.
The easiest way to create a topic for help with your own solution is to click the Ask for Help button located on each challenge. This will automatically import your code in a readable format and pull in the challenge url while still allowing you to ask any question about the challenge or your code.
Thank you.
I moved your question to its own topic.
a
b
and c
are local variables, the coefficients are already stored in the object with self.coefficients
, having the same value twice would be wasteful. So to write functions in a clearer way, you can unpack the values from self.coefficients
locally
Thanks I was wondering about this as well.