fork download
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3.  
  4. # Generate x values from 0 to 100 with a step of 0.01
  5. x = np.arange(0, 100.01, 0.01)
  6.  
  7. # Calculate corresponding y values using y = e^x
  8. y = np.exp(x)
  9.  
  10. # Create the plot
  11. plt.plot(x, y)
  12.  
  13. # Customize the plot
  14. plt.xlabel("x")
  15. plt.ylabel("y = e^x")
  16. plt.title("Graph of y = e^x")
  17. plt.grid(True)
  18.  
  19. # Show the plot
  20. plt.show()
Success #stdin #stdout 0.63s 55928KB
stdin
Standard input is empty
stdout
Standard output is empty