Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EspaceRaspberryFrancais/26a9f8e3e20b426ef3548d0f10e881f7 to your computer and use it in GitHub Desktop.
Save EspaceRaspberryFrancais/26a9f8e3e20b426ef3548d0f10e881f7 to your computer and use it in GitHub Desktop.
def fichierVersListe(cheminFich):
f = open(cheminFich, "r")
points=[]
temperatures=[]
for line in f:
points.append([line[0:2], line[3:5], line[6:len(line) - 1]])
temperatures.append(float(line[6:len(line) - 1]))
f.close()
return [points, temperatures]
def moyenneListe(liste):
res=0
for i in liste:
res+=i
return (res/len(liste))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment