PDA

View Full Version : Python



Fobian
09-06-2012, 11:14 PM
I went looking on Google for python information. I got myself a "cheat sheet" as well as tutorials to learn python. I learn best if I am able to read and actually put it in the computer to make the connection. Is there a place where I could find projects to help make it more understandable to me? (example: C++ has the Hello world) All I could find was projects other people have done that is out of my range for the moment.

tician
09-07-2012, 12:39 AM
http://docs.python.org/

Pretty much everything you can learn about python is there along with several tutorials.

Gertlex
09-07-2012, 10:31 AM
Yup, docs.python and searching StackOverflow for Python questions are all I ever use...

In my experience, learning code happens when I have a project that I want to do, rather than an arbitrary project that will have zero use to me when I'm done. What's your goal with Python?

jwatte
09-07-2012, 11:52 AM
http://learnpythonthehardway.org/

A (http://learnpythonthehardway.org/)nd, despite the name, it's actually the easy way :-)

Fobian
09-08-2012, 10:09 AM
main goal = ROS. And I'm trying to make that be a piece of cake by the time I get to that langauge. I had a python question that has stumped me very well. Ive spent at least an hr + searching and 8 hrs at working pondering with no results. I found a site thats helping me learn since it provides heres how to do it now its your turn to do it. The question that has me is:


Write a program to swap the values of two variables. The grader will automatically define variables x and y for you, with numerical values. You must write code that exchanges their values: the value of x after your code runs must equal the value that y had before your code ran, and the value of y after your code runs must equal the value that x had before your code ran. Your program does not need to print any output.

I have x=y on one line and puzzled for next line.

Fobian
09-08-2012, 10:14 AM
I was also going to learn a good amount of programming a year or so ago but now I have a motivation to uncover the books piled with dust thats been collecting on the shelf. :happy: besides I might even be able to land a programming job by the time I'm done! lol

Gertlex
09-08-2012, 10:20 AM
For the problem you gave above, define a third variable... I'll let you figure out the rest ;)