Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import matplotlib.pyplot as plt
- listRange = int(input('Provide a value for list range: '))
- xValue = list(range(-listRange,listRange))
- if 0 in xValue: xValue.remove(0)
- equation = [2/(x**2) for x in xValue]
- plt.grid()
- plt.ylim(0,max(equation))
- plt.plot(xValue, equation)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement