Intro to Programming and Data Science (Summer 2020)/Day 1 Coding Challenge

From CommunityData
< Intro to Programming and Data Science (Summer 2020)
Revision as of 19:23, 22 November 2019 by Jdfoote (talk | contribs) (Created page with "Our goal is to get your computer set up with the software you will need for this course and to get started with some basic programming concepts. * Start your laptop and get o...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Our goal is to get your computer set up with the software you will need for this course and to get started with some basic programming concepts.

  • Start your laptop and get on the wireless network.
  • Work through the goals on this page in order; they should take around 2 hours. I will help troubleshoot and answer questions — don't hesitate to ask!
  • When you've finished all of the goals, raise your hand and I will come over and go through the checklist with you to make sure everything is working.

Goal #1: Set up Python

(Estimated time: 5 minutes)

First things first: We are going to install "Anaconda". This is a suite of programs for doing data science with Python. It will install the Python programming language, together with a number of other packages that we will be using later in the course, such as pandas and Jupyter. Please complete the instructions below for your operating system:

Goal #2: Get a text editor

(Estimated time: 5 minutes)

It is pretty rare for non-programmers to edit plain text files directly and so Notepad (for Windows) or TextEdit (for Mac) is likely all that you've ever used or needed.

Because programmers work with text files all day, they have built many, many text editors and have very strong feelings about the merits of their preferred editor and the weaknesses of competitors.

I am not immune from this human failing, and I'm happy to talk at length about my preferred editor. However, in this course I will use a simpler editor called Atom, which is free and open source. I highly recommend that you also use Atom. If you want to use something else, then talk to me about it.


Goal #3: Practice starting and exiting Python

(Estimated time: 5 minutes)

We'll do a lot of learning and practicing at a Python prompt (this is "interactive" because you are typing the code and hitting enter to run it yourself, instead of running it from a file). So let's practice starting and exiting Python:

Goal #4: Practice navigating the computer from a terminal

(Estimated time: 10 - 15 minutes)

In addition to interactively running code, we'll also be writing whole programs and running them from the terminal. This means we'll want to be comfortable with navigating to those programs from the terminal prompt. In this section, we'll practice using these navigation commands.

Goal #5: Practice running Python code from a file

(Estimated time: 5 minutes)

Now that you know how to get to a file in the terminal, in this section, we'll practice running Python scripts.

Goal #6: Start learning Python!

(Estimated time: 60 - 90 minutes)

It's time to start learning, reading, and writing some Python! Tonight, you'll work through a self-directed tutorial. Next week, we'll have an interactive lecture to cover more Python basics.

Day 1 Tutorial

Goal #7: Practice Python using Codecademy

(Estimated time: 30 - 60 minutes)

It's time to use what we've learned in the tutorial and get some practice thinking about and solving problems in Python.

The online code learning site DataCamp has been kind enough to make their materials available to our class. You should have received an invitation to our DataCamp class site. If you haven't yet, then create an account and log in.

For tonight (and the rest of this week), work on the assignment in DataCamp.


Goal #8: Checkoff

Tell me that you are ready to be checked off. Together we will go through the following check-off steps:

  • Start a terminal prompt, and from that prompt start Python. Then quit Python.
  • Create a new Python file (with a .py extension). In that file, type: print("Hello World") and then Enter and save the file. From a terminal prompt, navigate to and execute that Python script.
  • Open your text editor, and press "Tab". Use the left arrow key to show the instructor that you are using spaces to indent, not tabs.
  • Walk through the Tutorial concept that was most confusing for you. The Tutorial is Day 1 Tutorial.
  • Walk through the DataCamp problem that you had the most difficulty with.

If you have any other questions about the tutorial, project setup, or Datacamp questions, now is a great time to ask!

Congratulations!

You are done with the first class in this series!