1.1-Introductie-Programmeren

Count Straat’s

Difficulty: Filled Outlined Outlined

Load the data from “streetnames.csv” into a list and count the number of streets which actually contain the String “Straat” in the streetname (e.g. “DorpsSTRAAT”, “StationsSTRAAT”). Then display the number of streets with the word Straat and the percentage this is of all streets. Ignore the case of the word “Straat” in your search. Have a look at the String documentation to see how to do this (there are several options).

Note that this assignment is all about the loops, so:

In a comment below your code indicate which was better (if either) and why?

Example

Example