Intro to Conditional Statements in Python
Welcome to Week 8!
Welcome to Week 8 of the Earth Analytics Bootcamp course! This week, you will write efficient
Python code using
Jupyter Notebooks. You will will implement another strategy for DRY (i.e. Do Not Repeat Yourself) code: conditional statements combined with for loops.
After completing the lessons for Week 8, you will be able to:
- Explain how conditional statements help you to write DRY code
Pythoncode for conditional statements to run tasks only when certain conditions are met
- Create for loops to automate tasks
Homework & Readings
Click here to view the GitHub Repo with the assignment template.
Earth Data Science Textbook Readings
Please read the following chapters of the Intro to Earth Data Science online textbook to support completing this week’s assignment:
Please read the following chapters to support completing this week’s assignment:
- Chapter 17 - intro to conditional statements in Python.
- Chapter 18 in Section 7 Introduction to for loops in Python.
OPTIONAL: you may also want to read the chapter below on manipulating file paths and directories:
Example Homework Plots
The plots below are examples of what your plot could look like. Feel free to customize or modify plot settings as you see fit!
✅ The path /root/earth-analytics/data exists. Nothing to do here Downloading from https://ndownloader.figshare.com/files/25033508 Extracted output to /root/earth-analytics/data/earthpy-downloads/ca-fires-yearly