I am trying to work on a graphing calculator in Python using Numpy and Matplotlib. Here is my code:
import numpy as np
import matplotlib.pyplot as plt
a = input("enter operation")
#operation can be something like '**2 or + 1'
b = np.arange(1,10)
#here is where i am stuck.
How do you add the input a
to numpy array b
?
I want another method besides eval. All the other projects people have showed me use eval.