112 lines
2.7 KiB
Plaintext
112 lines
2.7 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"The second homework is to explore the data located at \"https://gitlab.com/didiercrunch/honore-beaugrand/raw/master/resources/data/homework2/classes.edn\". The data is composed of the personal information of students attending three classes.\n",
|
|
"\n",
|
|
"> tip [slurp](https://clojuredocs.org/clojure.core/slurp), [read-string](https://clojuredocs.org/clojure.core/read-string), [map](https://clojuredocs.org/clojure.core/map)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"### Question number 1\n",
|
|
"How many students is there in the school?"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"### Question number 2\n",
|
|
"What is the age of the oldest/youngest student.\n",
|
|
"\n",
|
|
"> tip: [min](https://clojuredocs.org/clojure.core/min), [max](https://clojuredocs.org/clojure.core/min) and [apply](https://clojuredocs.org/clojure.core/apply)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"### Question number 3\n",
|
|
"What is the name of the oldest/youngest student?\n",
|
|
"\n",
|
|
"> tip: [min](https://clojuredocs.org/clojure.core/min), [max](https://clojuredocs.org/clojure.core/min) and [apply](https://clojuredocs.org/clojure.core/apply)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Question 4\n",
|
|
"\n",
|
|
"What is the average age in the school?\n",
|
|
"\n",
|
|
"> tip: [reduce](https://clojuredocs.org/clojure.core/reduce), [+](https://clojuredocs.org/clojure.core/+), [count](https://clojuredocs.org/clojure.core/count)"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"metadata": {},
|
|
"source": [
|
|
"## Question 5\n",
|
|
"\n",
|
|
"What is the proportion of girls and boys in the school?"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Lein-Clojure",
|
|
"language": "clojure",
|
|
"name": "lein-clojure"
|
|
},
|
|
"language_info": {
|
|
"file_extension": ".clj",
|
|
"mimetype": "text/x-clojure",
|
|
"name": "clojure",
|
|
"version": "1.9.0"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 2
|
|
}
|