# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# + [markdown] hide_input=false slideshow={"slide_type": "slide"}
# # Computational Thinking
# *Lesson Developer: <NAME> <EMAIL>*

# + init_cell=true slideshow={"slide_type": "skip"} tags=["Hide"]
# This code cell starts the necessary setup for Hour of CI lesson notebooks.
# First, it enables users to hide and unhide code by producing a 'Toggle raw code' button below.
# Second, it imports the hourofci package, which is necessary for lessons and interactive Jupyter Widgets.
# Third, it helps hide/control other aspects of Jupyter Notebooks to improve the user experience
# This is an initialization cell
# It is not displayed because the Slide Type is 'Skip'

from IPython.display import HTML, IFrame, Javascript, display
from ipywidgets import interactive
import ipywidgets as widgets
from ipywidgets import Layout

import getpass # This library allows us to get the username (User agent string)

# import package for hourofci project
import sys
sys.path.append('../../supplementary') # relative path (may change depending on the location of the lesson notebook)
import hourofci


# load javascript to initialize/hide cells, get user agent string, and hide output indicator
# hide code by introducing a toggle button "Toggle raw code"
HTML(''' 
    <script type="text/javascript" src=\"../../supplementary/js/custom.js\"></script>
    
    <style>
        .output_prompt{opacity:0;}
    </style>
    
    <input id="toggle_code" type="button" value="Toggle raw code">
''')

# + [markdown] slideshow={"slide_type": "slide"}
# Computational thinking represents the way we consider problems and solutions in ways that computers, or computer systems, would be able to execute. ‘Thinking like a computer’ doesn’t mean thinking in binary, but thinking in ways that enable problem solving with a computer.
# Let’s consider an example that’s certainly safer within a computer simulation than out in the real world - a forest fire!

# + [markdown] hide_input=true slideshow={"slide_type": "slide"}
# ## Forest fire simulations and visualizations
# On the next page, there is an example of a **simulation** of a forest fire. It is as if your computer is pretending to burn an actual forest, but in reality nothing is being burned; the computer is only doing what it does best: **computations**. By showing you pictures of trees, the computer gives you a **visualization** of how the forest burns. Although you cannot see the _computations_ a computer is doing, you can see the _visualizations_ it shows you. Throughout this lesson you will get a taste of how to think **computationally** to understand how a computer is able to **simulate** something like a forest fire.

# + hide_input=false slideshow={"slide_type": "slide"} tags=["Init", "Hide", "1A"]
IFrame(src="supplementary/fire-imgs.html", width=350, height=450)

# + [markdown] slideshow={"slide_type": "slide"}
# Simulations like this allow us to predict a phenomenon or occurrence in some environment or context. By representing the occurrences within the simulation, we can see how it is operating and working - and in a much safer way than trying this experiment in the real world.

# + [markdown] slideshow={"slide_type": "-"}
# **Continue the journey: [Next Example](ct-2.ipynb)**

StarcoderdataJupyterScriptsDedupFiltered