--- a/templates/alcohol.scala Wed Nov 08 16:08:16 2017 +0000
+++ b/templates/alcohol.scala Wed Nov 08 20:27:56 2017 +0000
@@ -13,16 +13,17 @@
"population.csv"
-//(1) Complete the get_csv_page function below. It takes the URL-string
-// as argument and generates a list of strings corresponing to each
-// line in the csv list. The URL url_alcohol is one possible argument.
+//(1) Complete the get_csv_page function below. It takes a URL-string
+// as argument and generates a list of strings corresponding to each
+// line in the downloaded csv-list. The URL url_alcohol above is one
+// possible argument.
//def get_csv_page(url: String) : List[String] = ...
-// Complete the get_csv_file function below. It takes a file-string
-// as argument and reads the content of the given file. Like above
-// it should generates a list of strings corresponing to each
+// Complete the get_csv_file function below. It takes a file name
+// as argument and reads the content of the given file. Like above,
+// it should generate a list of strings corresponding to each
// line in the csv-list. The filename file_population is one possible
// argument.
@@ -34,7 +35,7 @@
// process_alcs extract the country name (as String) and the
// pure alcohol consumption (as Double). For process_pops
// generate a Map of Strings (country names) to Long numbers
-// (population size).
+// (population sizes).
//def process_alcs(lines: List[String]) : List[(String, Double)] = ...
@@ -45,11 +46,11 @@
//(3) Calculate for each country the overall alcohol_consumption using
// the data from the alcohol list and the population sizes list. You
// should only include countries on the alcohol list that are also
-// (with the exact name) on the population sizes list. Note that
+// on the population sizes list with the exact same name. Note that
// the spelling of some names in the alcohol list differs from the
-// population sizes list. Sort the resulting list according to the
-// country with the highest alcohol consumption to the country
-// with the lowest alcohol consumption.
+// population sizes list. You can ignore entries where the names differ.
+// Sort the resulting list according to the country with the highest alcohol
+// consumption to the country with the lowest alcohol consumption.
//def sorted_country_consumption() : List[(String, Long)] = ...
@@ -58,7 +59,7 @@
// should be the first element in the tuple below. The second element is
// the overall consumption of the first n countries in the sorted list
// from above; and finally the double should be the percentage of the
-// first n countries of the the world consumption of alcohol.
+// first n countries drinking from the the world consumption of alcohol.
//def percentage(n: Int) : (Long, Long, Double) = ...