Pre-class assignments will be composed of a combination of videos, text to read, and small assignments. The goal of these assignments is to prepare you for class the following day. You should watch the videos and read the text, and then do the assigned work. You also need to provide feedback in the Google Form at the bottom of the notebook. You will be graded on making a good-faith effort, not on correctness!
To make notebook cells that have Python code in them do something, hold down the 'shift' key and then press the 'enter' or 'return' key (you'll have to do this to get movies to run). To edit a cell (to add answers, for example) you double-click, add your text, and then enter it by holding down 'shift' and pressing 'enter'.
This assignment is due by 11:59 p.m. the day before class, and should be uploaded into the "Pre-class assignments" dropbox folder for Day 2. Submission instructions can be found at the end of the notebook.
In [ ]:
# The command below this comment imports the functionality that we need to display
# YouTube videos in a Jupyter Notebook. You need to run this cell before you
# run ANY of the YouTube videos.
from IPython.display import YouTubeVideo
In [ ]:
# the command below this comment actually displays a specific YouTube video,
# with a given width and height. You can watch the video in full-screen (much higher
# resolution) mode by clicking the little box in the bottom-right corner of the video.
YouTubeVideo("jT0KZ849fak",width=640,height=360)
Question 1: Come up with an algorithm for a simple task that you do every day (i.e., putting on your shoes). What are the steps of this algorithm?
Put your answer to Question 1 here! (double-click on this text to edit this cell, and hit shift+enter to save the text)
Question 2: Think about the algorithm you devised in the previous question and the video you just watched. Identify the various parts of your algorithm, as defined by the video.
Put your answer to question 2 here! (double-click on this text to edit this cell, and hit shift+enter to save the text)
In [ ]:
YouTubeVideo("L03BzGmLUUE",width=640,height=360)
Question 3: Given the video you watched, why do you think we're using IPython notebooks in class instead of a command-line version of Python?
Put your answer here! (double-click on this text to edit this cell, and hit shift+enter to save the text)
Question 4: This isn't a question so much as a to-do. You need to install the program NetLogo on your computer for tomorrow's class. (You may first need to install Java on your computer to make this work!) To do this, go to the link above, download the appropriate version for your computer, and then follow the installation instructions. To test that it works, do the following:
Congratulations! You've installed NetLogo.
Change the text here to say that you have installed and tested NetLogo. (double-click on this text to edit this cell, and hit shift+enter to save the text)
Please fill out the form that appears when you run the code below. You must completely fill this out in order to receive credit for the assignment!
In [ ]:
from IPython.display import HTML
HTML("""
<iframe
src="https://docs.google.com/forms/d/e/1FAIpQLSedVfvn-6kn3oTiyl2IeJglS7twoa8CdkcyLopqv-XWOtnUYQ/viewform"
width="80%"
height="1200px"
frameborder="0"
marginheight="0"
marginwidth="0">
Loading...
</iframe>
""")