Python Basics

by Elliott Hauser

25 Aug 2022

INF 380P. The P is for Party.

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 Hybrid Covid style course
  • 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.

You, yes you, right now, can edit this program! Find and change the color names and click run:

We’ll talk a bit more about the interface of trinket in class.

Finally, let’s review via an Overview of the Platforms We’ll Use. This and other content you might want to reference later is in the class website’s How-to tab.

Intermission

  • Submit your welcome form

Attendance and a bit about you

Let’s briefly get to know each other’s names and backgrounds! Please answer the following when I call on you:

  • Your name
  • What are you studying?
  • Why are you interested in programming?
  • What’s your favorite piece of software ever? Could be a website, mobile app, a historical program like ELIZA, or the classic DOC game Oregon Trail.

Note: With reasonable exceptions, we’ll ask everyone to sit in the same place all semester to aid in contact tracing in the unfortunate event that anyone in class gets Covid this semester

Last Words / Next Steps

  • A theme for programming: type and read your code closely
  • We’re aiming for cutural immersion, not cultural assimilation. Be open to coding cultures, and be yourself within them!
Elliott Hauser is an Assistant Professor at the UT Austin iSchool. He's hacking education as one of the cofounders of Trinket.io. Find Elliott Hauser on Twitter, Github, and on the web.