fantho69

x^2-2023y^2-1=0.py

Dec 29th, 2022
1,347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.50 KB | Science | 0 0
  1. N=10
  2. def solvepospell1(x1,y1,i,n):
  3.     while i < n:
  4.         x=2024*x1+91035*y1
  5.         y=45*x1+2024*y1
  6.         print(x,y)
  7.         return solvepospell1(x,y,i+1,n)
  8.    
  9. def solvepospell2(x1,y1,i,n):
  10.     while i < n:
  11.         x=2024*x1-91035*y1
  12.         y=-45*x1+2024*y1
  13.         print(x,y)
  14.         return solvepospell2(x,y,i+1,n)
  15. # driver code
  16. print("x y")
  17. print(1,0)
  18. solvepospell1(1,0,1,N)
  19. print(-1,0)
  20. solvepospell2(1,0,1,N)
  21. print(1,0)
  22. solvepospell1(-1,0,1,N)
  23. print(-1,0)
  24. solvepospell2(-1,0,1,N)
  25.  
Advertisement
Add Comment
Please, Sign In to add comment