Python Basics

by Elliott Hauser

17 May 2017

Quick Intro

tl;dl: Coding should be fun! Do lots of it and you’ll get good at it. Don’t cheat, pay attention, be on time.

  • My bio
  • My stance on Honor
  • My pay attention policy
  • My late policy
  • The benefits and challenges of our accelerated Summer schedule
  • Questions for me?
  • Some questions for you are in the welcome form you’ll fill out today
  • Basic orientation to website

Read the syllabus and feel free to email me with any questions or concerns.

Why this class is cool:

  • You will make games and command line scripts with Python
  • You will submit and merge pull requests on github (an important professional skill!)
  • You will use several languages besides Python including YAML, Markdown, and HTML
  • You will feel confident and be effective a learning new things
  • You will learn problem solving strategies and attitudes that will serve you well in any career

Why Python is Cool

Cool interactive animations:

Interactive Games:

Data Viz:

But programs can also be very simple, and we’ll start simple.

Your First Python Program

Programs are composed of small pieces. In this class you’ll learn about the pieces and then put the pieces together to form more and more complex programs. Our first in-class exercise will take you from drawing a simple line to making more complex drawings. This will prepare you for your first homework, which is to use what we learn in class and online resources to make a drawing.

Todos

These will be on the assignments page, but I wanted to make sure everything was clear for the first day.

Complete these by midnight tonight:

  • Sign up for Github
  • Sign up for Trinket. You’ll need a premium Trinket account by the 2nd week of class. Use code inls560rocks for 50% off.
  • In trinket, go home and click Join Class. Enter code 2PNyyW. ‘INLS 560 Assignments’ will now appear on your homepage (in addition to my links to it)
  • Complete and Submit the “Basics of Turtle” exercise on my Trinket course

Complete these by the beginning of next class:

  • Read Why Python
  • Get access to “Python Game Development for Beginners” by yours truly. I suggest a subscription to Safari Books Online. This will also give you access to a wide range of other tech resources for this class and beyond. PSA: Safari offers a 10 day free trial.

Let’s Go!

Our first in-class exercise will have you making a cool animation with Python. Check it out. I’ll stop us periodically to discuss and share your progress. No need to Submit during class: your progress will be saved and you’ll be able to submit after class. Use all the time you have tonight to explore Python and get creative!

Elliott Hauser is a PhD Student in information science at UNC Chapel Hill. He's hacking education as one of the cofounders of Trinket.io. Find Elliott Hauser on Twitter, Github, and on the web.