Advertisement
Guest User

Untitled

a guest
Dec 16th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. import matplotlib.pyplot as plt
  2.  
  3.  
  4. listRange = int(input('Provide a value for list range: '))
  5. xValue = list(range(-listRange,listRange))
  6. if 0 in xValue: xValue.remove(0)
  7. equation = [2/(x**2) for x in xValue]
  8.  
  9. plt.grid()
  10. plt.ylim(0,max(equation))
  11. plt.plot(xValue, equation)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement