1.

Consider the following graph . Write the code to plot it.

Answer»

import matplotlib.pyplot as plt

plt.plot([2,7],[1,6])

plt.show()

alternative answer

import matplotlib.pyplot as plt 

a = [1,2,3,4,5,6]

b = [2,3,4,5,6,7]

plt.plot (a,b)



Discussion

No Comment Found

Related InterviewSolutions