From c2fbb731c13e9935afe0d45469060be55779f4c4 Mon Sep 17 00:00:00 2001 From: zhuwq Date: Sat, 7 Sep 2024 14:35:11 -0700 Subject: [PATCH] update --- docs/README.md | 6 +- .../exercises/00_introduction_python101.ipynb | 6 +- docs/exercises/00_introduction_python101.md | 68 ------------------- exercises | 1 + lectures | 1 + 5 files changed, 10 insertions(+), 72 deletions(-) delete mode 100644 docs/exercises/00_introduction_python101.md create mode 120000 exercises create mode 120000 lectures diff --git a/docs/README.md b/docs/README.md index 36582a3..ae9c700 100644 --- a/docs/README.md +++ b/docs/README.md @@ -24,11 +24,11 @@ The class will be a combination of lectures and hands-on exercises. We will use ## Schedule -| Date | Topic | Notebooks | +| Date | Topic | Links | | --- | --- | --- | | 09/02 | Labor Day | | -| 09/09 | [Introduction && Python 101] | | -| 09/16 | [Numpy & Pandas] | | +| 09/09 | [Introduction && Python 101] | [slides](https://ai4eps.github.io/EPS88_PyEarth/lectures/00_introduction_python101), [notebook](https://ai4eps.github.io/EPS88_PyEarth/exercises/00_introduction_python101) | +| 09/16 | [Numpy & Pandas] | [slides](https://ai4eps.github.io/EPS88_PyEarth/lectures/01_numpy_pandas), [notebook](https://ai4eps.github.io/EPS88_PyEarth/exercises/01_numpy_pandas) | | 09/23 | [Maplotlib & Cartopy & PyGMT] | | | 09/30 | [SkLearn: Supervised Learning: Regression & Classification] | | | 10/07 | [Sklearn: Advanced models: SVM & Decision Tree] | | diff --git a/docs/exercises/00_introduction_python101.ipynb b/docs/exercises/00_introduction_python101.ipynb index 54e3532..c3678c9 100644 --- a/docs/exercises/00_introduction_python101.ipynb +++ b/docs/exercises/00_introduction_python101.ipynb @@ -5,7 +5,11 @@ "metadata": {}, "source": [ "# PyEarth: A Python Introduction to Earth Science\n", - "## Class 1 Exercises" + "\n", + "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/AI4EPS/EPS88_PyEarth/blob/main/docs/exercises/00_introduction_python101.ipynb)\n", + "\n", + "\n", + "## Python101 Exercises" ] }, { diff --git a/docs/exercises/00_introduction_python101.md b/docs/exercises/00_introduction_python101.md deleted file mode 100644 index f66a38e..0000000 --- a/docs/exercises/00_introduction_python101.md +++ /dev/null @@ -1,68 +0,0 @@ -# PyEarth: A Python Introduction to Earth Science -## Class 1 Exercises - -### Exercise 1: Variables and Data Types - -Create variables for the following Earth-related information: - -- Name of our planet -- Earth's radius in kilometers -- Earth's average surface temperature in Celsius -- Whether Earth has a moon (use a boolean) -- A list of Earth's layers (inner core, outer core, mantle, crust) - -Print all these variables. - - -### Exercise 2: Arithmetic Operations - -Calculate the following: - -- The circumference of Earth (use the radius from Exercise 1 and the formula 2 * π * r) -- The difference between the boiling point of water (100°C) and Earth's average surface temperature -- The number of times Earth's diameter (use the radius from Exercise 1) can fit between Earth and the Moon (average distance: 384,400 km) - -Print the results. - - -### Exercise 3: Control Flow - -Create a function that takes a temperature in Celsius and returns a description of Earth's temperature: - -- If temp < 0: "Earth is in an ice age" -- If 0 <= temp < 15: "Earth is cool" -- If 15 <= temp < 25: "Earth is moderate" -- If temp >= 25: "Earth is warm" - -Test your function with different temperatures. - - -### Exercise 4: Lists and Loops - -Given the list of planets: `["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"]` - -Write a loop that prints each planet's name and its position from the Sun. - -Example output: "Mercury is the 1st planet from the Sun" - - -### Exercise 5: Functions - -Write a function that converts kilometers to miles (1 km = 0.621371 miles). -Use this function to convert Earth's radius to miles. - - -### Bonus Exercise: Dictionaries - -Create a dictionary for Earth with the following keys and values: - -- name: "Earth" -- radius_km: (use the value from Exercise 1) -- has_moon: (use the value from Exercise 1) -- atmosphere_composition: {"nitrogen": 78, "oxygen": 21, "other": 1} - -Write a function that takes this dictionary and prints a summary of Earth's properties. - -Example output: - -"Earth has a radius of X km and has/doesn't have a moon. Its atmosphere is composed of 78% nitrogen, 21% oxygen, and 1% other gases." diff --git a/exercises b/exercises new file mode 120000 index 0000000..0bd6ba7 --- /dev/null +++ b/exercises @@ -0,0 +1 @@ +docs/exercises \ No newline at end of file diff --git a/lectures b/lectures new file mode 120000 index 0000000..6c96d43 --- /dev/null +++ b/lectures @@ -0,0 +1 @@ +docs/lectures \ No newline at end of file