Advertisement
UF6

Question 10 Final

UF6
May 8th, 2016
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. from sympy import*
  2. from sympy.solvers.diophantine import diophantine
  3. var('x y')
  4. diophantine(x**2 +y**2 -25)#1
  5. diophantine(x**2 -9-y)#2
  6.  
  7. #other way to solve it
  8. from sympy import*
  9. from sympy.solvers import solve
  10. from sympy import symbol
  11. x = symbol('x')
  12. y= symbol('y')
  13.  
  14. solve(x**2 -9-y)#1
  15. solve(x**2 +y**2 -25, x)#2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement