This is the P2PU Archive. If you want the current site, go to www.p2pu.org!

Learn Python the Hard Way

My recent threads

You haven't posted any discussions yet.

Recently updated threads

Week 1: Exercises 1-4

Go back to: General discussion
Exercise 1: A Good First Program, page 11
 
Exercise 2: Comments And Pound Characters, page 13
 
Exercise 3: Numbers And Math, page 15
 
Exercise 4: Variables And Names, page 17

These exercises are due January 30th (but you don't have to submit anything).  Make sure to do the extra credit too!  

 
Steve Phelps's picture
Steve Phelps
Thu, 2011-01-20 19:19

cool!

nada A.S's picture
nada A.S
Thu, 2011-01-20 19:23

Hello Miss.Mvolz,

How we can make extra credit? And why we don't need to submit the solutions?

Thank you,
Nada

Omar Chavez Rodriguez's picture
Omar Chavez Rodri...
Thu, 2011-01-20 19:23

Ok those were my questions too, do we wait until you do an announcement?

Rodrigo Zerbini's picture
Rodrigo Zerbini
Thu, 2011-01-20 19:31

What extra credit?

Shabab Mustafa's picture
Shabab Mustafa
Thu, 2011-01-20 19:50

Each exercise of the textbook we are following has a section titled as 'Extra credit' at the end. Please follow page 12 to get a clear idea.

Thanks.

Steve Phelps's picture
Steve Phelps
Thu, 2011-01-20 20:04

If everyone wants to "submit" their assignments, I am sure we could create a forum thread for each exercise and the associated extra credit. We could post our work there as "proof" we completed the assignment, and perhaps share anything we might have learned.

pborzel's picture
pborzel
Thu, 2011-01-20 20:10

I like Steve's idea or something similar, sort of a brain dump to compare our work to someone/everyone else's, make sure we are on the right track and then setup a questions forum or something.

brandon plemon's picture
brandon plemon
Thu, 2011-01-20 20:25

I am completely onboard with steve and pborzel... what better way to learn than do it and get ur peers help/advice.

Steve Phelps's picture
Steve Phelps
Thu, 2011-01-20 20:26

Ok...I created a Forum for (I like pborzel's phrase) a brain dump about Exercise 4, since that is what I just completed.

Might be good...I need this to hold me accountable. I would like to actually LEARN Python, you know?

Steve Phelps's picture
Steve Phelps
Thu, 2011-01-20 20:27

Perhaps someone else can start a Forum for the the other three exercises?

adam balcom's picture
adam balcom
Thu, 2011-01-20 20:39

but the first two are simple 4 is where it starts to get good but

adam balcom's picture
adam balcom
Thu, 2011-01-20 20:39

but the first two are simple 4 is where it starts to get good but i know if i dont stop my sef im well do them all in a night or so

pborzel's picture
pborzel
Thu, 2011-01-20 21:42

Exercises 1-3 are up.

Steve Phelps's picture
Steve Phelps
Thu, 2011-01-20 21:53

Thanks, pborzel

Saurabh Bansal's picture
Saurabh Bansal
Fri, 2011-01-21 11:49

@steve: u wrote uve taught python to 7th graders...is that really true?

Steve Phelps's picture
Steve Phelps
Fri, 2011-01-21 17:44

I have taught programming on the TI-83/84 to 8th graders. Not python to 7t graders.

However, I DO think it could be done.

jennifer karmon's picture
jennifer karmon
Sat, 2011-01-29 06:40

FWIW, there *is* a book on computer programming for children, using Python as the language. It's good.

John Owens's picture
John Owens
Fri, 2011-01-21 16:28

Complete first four excercises. Windows users may find it useful to add Python to their environment path. It means the .py files will run anywhere on your computer not just in your Python folder. Details on how to do this here:

http://www.imladris.com/Scripts/PythonForWindows.html

Steve Phelps's picture
Steve Phelps
Fri, 2011-01-21 17:44

Thanks, Paul!

ZM L's picture
ZM L
Sat, 2011-01-22 16:02

Hi, new to this course. However my computer already has python 3 (My sister use it for her work). I'm not sure if I could install python 2.7 without causing any conflicts. I did beginning exercise with python 3 actually. Would it be okay as long as I continue the course knowing the difference between python 2.7 print and python 3 print()?

M. Volz's picture
M. Volz
Sat, 2011-01-22 16:28

You're welcome to try it! You may run into other problems, however, since python 3 isn't backwards compatible with 2 in other ways as well (not just print statements!). But you'd probably be fine.

Another thing to consider is try installing a virtual environment for python, which allows you to run the version of python that you need without interfering with your sister's installation. I don't know what operating system you're using, but if you're using linux or mac os I use this: http://www.doughellmann.com/docs/virtualenvwrapper/install.html#python-v...

Amene Katanda's picture
Amene Katanda
Sat, 2011-01-22 17:31

I run 3 versions of Python on my machine: versions 2.6, 2.7 and 3.
There is no conflict at all. Python 2.7 will install in a separate directory and you will still be able to run Python 3.

Guntis L's picture
Guntis L
Sat, 2011-01-22 15:50

I couldn't type a single quote in gedit without setting English as Windows default input language, so I used Virtualbox to run openSUSE. In Seamless Mode I don't even notice I'm running Linux.
I guess this could also be a solution to running two Python versions on one PC.

ZM L's picture
ZM L
Mon, 2011-01-24 11:01

Hi peeps, unfortunately I will be moving house on 26 of January, so I might not be around for a while (hope the progress isn't too fast!). But I will catch back fast when I'm back. I did my work to exercise 8 for now just in case.

See you all soon!

Sammy Dhaliwal's picture
Sammy Dhaliwal
Wed, 2011-01-26 11:18

Finished exercises 1 to 4. Very cool. I suppose the fun part begins now.

Patrick Crosman's picture
Patrick Crosman
Fri, 2011-01-28 22:33

Hey guys. I had a problem at first with "Python is not recognized BLahblahblah Please firmly slap palm to forehead cause command line hates you..."

and this solved video addressed the problem and provided a solution
http://showmedo.com/videotutorials/video?name=960000&fromSeriesID=96

Sid's picture
Sid
Sat, 2011-01-29 20:18

Finished exercises 1 to 4 great!!