[Tutor] Problem with task, please help!

michiel nijs michielnijs2010 at hotmail.com
Sat Oct 27 15:41:20 EDT 2018


Hello,
I am an engineering student and we have to use Python. We don't have lessons so we all have to learn it on our own. We got a task and I am stuck on this:
"Count the number of parcels for forrest ground and count the number of parcels for orchard ground". I think I have to use the for-loop but I don't know how.
This is what i already have:

import numpy as np
import csv
from matplotlib import pyplot as plt

def getlanduse():
    with open('LandUse.csv', encoding='latin-1') as csvfile:
        readCSV = csv.DictReader(csvfile, delimiter=';')
        return list(readCSV)


In the file i renamed the things we need from dutch to english :)
Thank you very much!



More information about the Tutor mailing list