mercredi 30 mars 2022

Random function not compatible with matplotlib?

import random
import matplotlib.pyplot as plt
a = 5
b = 10
c = 20
x = (print(random.randrange(a, b)))
y = (print(random.randrange(b, c)))
projectname = input('What is your project name?: ')
indep = input('What is your independent variable?: ')
dep = input('What is your dependent variable?: ')
plt.plot(x, y)
plt.xlabel(indep)
plt.ylabel(dep)
plt.title(projectname)
plt.show()

Here is the error code: "ValueError: x, y, and format string must not be None"

New to coding




Aucun commentaire:

Enregistrer un commentaire