lewando54

GO python

Jul 24th, 2017
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. file = open("E:\ciag_go\go.txt","w")
  2.  
  3. def kerw(a):
  4.     b=a*a
  5.     c=a-1
  6.     d=c*c
  7.     wy=b/d
  8.     file.write(repr(a))
  9.     file.write(" : ")
  10.     file.write(repr(wy))
  11.     file.write("\n")
  12.     print(a,":",wy)
  13.  
  14. x = float(input('ile iteracji?  '))
  15. y = 2.0
  16.  
  17. while y <= x:
  18.     kerw(y)
  19.     y=y+1.0
  20.  
  21. file.close()
Advertisement
Add Comment
Please, Sign In to add comment