Sunday, May 13, 2012

python v3 answers to MIT python course

I went through the MIT (gentle intro to programming) python course with my cousin. We decided to use python 3 to get some extra practice since the course material is all python 2. A few times, I found myself wishing I had the answers to check my work, or when I felt I was doing something wrong. Also, it was occasionally hard to get the code provided to work with v3.

So I decided to post my answers just in case it's useful to anyone else. Obviously I'm no expert since I'm going through an intro class, so keep that in mind if there's something wrong or if I did something in a weird way.

Individual zip files for each homework set:
  • HW1 - cipher.py, conditional_examples.py, height_example.py, hw1.py, input_example.py, loop_examples.py, loops.py, rps.py
  • HW2 - hw2.py, nims.py, opt2.py, pig_latin.py, string_and_lists.py
  • Project 1 - hangman.py, hangman_lib.py, hangman_lib_demo.py
  • HW3 - hw3.py, queue.py, stack.py
  • HW4, (v3 graphics.py is here) - ana_clock.py, car.py, dig_clock.py, tetrominoes.py, wheel.py
  • Project 2 - game_of_life.py, game_of_life_template.py
  • Final Project - tetris_template.py, tetris.py

One zip file for all homework:

No comments:

Post a Comment