Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
To expand on r's answer, the "bit of extra interpretation" might look like this: r = sp.solve([eq1, eq2]) # Solution set a_solutions = {d[a] for d in r} # Assert one solution assert len(a_so...
#2: Post edited
- To expand on [r's answer](https://software.codidact.com/posts/296349/296350#answer-296350), the "bit of extra interpretation" might look like this:
- ```py
- r = sp.solve([eq1, eq2])
- # Solution set
- a_solutions = {d[a] for d in r}
- # Assert one solution
- assert len(a_solutions) == 1
- # Extract it
a_solved = a_solutions.pop()- ```
- To expand on [r's answer](https://software.codidact.com/posts/296349/296350#answer-296350), the "bit of extra interpretation" might look like this:
- ```py
- r = sp.solve([eq1, eq2])
- # Solution set
- a_solutions = {d[a] for d in r}
- # Assert one solution
- assert len(a_solutions) == 1
- # Extract it
- a_solved = next(iter(a_solutions))
- ```
#1: Initial revision
To expand on [r's answer](https://software.codidact.com/posts/296349/296350#answer-296350), the "bit of extra interpretation" might look like this:
```py
r = sp.solve([eq1, eq2])
# Solution set
a_solutions = {d[a] for d in r}
# Assert one solution
assert len(a_solutions) == 1
# Extract it
a_solved = a_solutions.pop()
```
