If you already have a Python environment already set up that you're comfortable with, great. If not, I recommend downloading Python 3 from http://www.python.org/download/. It comes with a program called IDLE that helps you write small programs and run them. YouTube has some good videos for getting started with that, depending on whether you're running Windows, Mac, or Linux.
Here's the Python book I like to use to get started: http://openbookproject.net/thinkcs/python/english3e/
To do the problems below, you'll need to be roughly familiar with chapters 1-8 in that book, particularly chapters 5, 7, and 8. If you're starting from scratch, it might be a good idea to try the exercises in those chapters as you go along. When you're up to speed, you'll have the following basic building blocks for your programs:
- how to print output
- how to create variables and change their values
- how to use if statements to make choices
- how to use while loops to do repeated work