Introduction: How to Get Started With Python.
So you think to yourself, Man those coding dudes sure are cool! Or maybe your a coding guru and just want to learn another language to brag about in your mothers basement? Well either way you have chosen the right language. Python is one of the easiest and simple languages out there, yet it has the ability to do so much.
Now you may be thinking why is python so good or different from other languages, well let me tell you:
1. Simplicity = Easy to understand and pick up, great for newbies.
2. Rapid project development = With its simplicity it makes it a lot easier to quickly finish projects
3. Open source = Python is GNU open source meaning anyone can change and modify the source code.
4. Lots of resources = Great community loves to put out free resources.
5. Free = Most everything in python is FREE.
And from python.org
"Python is a remarkably powerful dynamic programming language that is used in a wide variety of application domains. Python is often compared to Tcl, Perl, Ruby, Scheme or Java. Some of its key distinguishing features include:
very clear, readable syntax
strong introspection capabilities
intuitive object orientation
natural expression of procedural code
full modularity, supporting hierarchical packages
exception-based error handling
very high level dynamic data types
extensive standard libraries and third party modules for virtually every task
extensions and modules easily written in C, C++ (or Java for Jython, or .NET languages for IronPython)
embeddable within applications as a scripting interface"
Cool stuff eh?
More about stuff and reasons to choose python here.
Note: All pictures have copyrights to their respective owners. I believe all of them are free to use but i may have made a mistake.
(This instructable is not really a step by step in learning python its more of a resource for helping find resources.)
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Getting Python.
Now you may be thinking to yourself "Geez! This language sounds amazing how do i get started in it!?!?!"
Well first your going to need to download it. Find your system here and download what you need for it.
I would recommend trying python 2.x first because not many things currently run with python 3.x.
Then find Idle. If your using windows Just go to start -> All programs -> Python2.x->IDLE
Once that is open you will see a header talking about python and a blinking cursor. Congratulations you have opened python.
Now click file -> New window and you have a syntax highlighting python scripting environment.
Note: If your having trouble finding idle send me a message.
Step 2: Hello World
Now it's time for your first real program*
On your open window type the following:
print will turn a different color to show you that you have used a built in function. if it does not you probably spelled it wrong or did something wrong
then hit F5 to run it. It will ask you what you want to save it as. Make sure you are in a directory where you can save it and save it as whatever you want. I saved mine as hello instructables
You should see
(look at the pictures)
After you've done that it you should be thinking "HOLY SMOKES I JUST WROTE MY FIRST PROGRAM!" and you have, now you can be off on your merry way programming like a pro.
*Yes this technically is a program
Step 3: Learning Python.
Now that you've got your new fancy toy and you feel like a young lad on Christmas it is time for...the boring part! YAY! But seriously, this is the only grueling part to python, but it's not really that bad.
So some FREE!!! online books to help you learn are:
How to think like a computer scientist
A byte of python
Once you read through those books you'll be going through forums and programs like your grandma did laundry. And yes that did not make sense.
Project A.U.S.M. reminded me of a book "Invent Your Own Computer Games with Python" 2nd Edition which is good if all your looking for to do is program games or have a really really short attention span, but for general practical use i recommended reading the first two first then coming back to this book for techniques on creating games. (Or at least thats how i did it)
Step 4: Welll Now That I Have Mastered Python Like Chuck Norris Mastered Kung-fu What Do I Do?
Some cool modules are listed here - It really depends on what you want to do. You can start making guis (Graphical user interfaces) Start making games (Unity has a REALLY cool python scripting environment called boo, and pygames pretty cool too!) or start web development with django or start making your own type of project.
If you ever get stuck always remember google is your friend and so is python.org's wiki located here.
If you have any questions feel free to ask me or the answers part of instructables.
1 Person Made This Project!
- coolsaurya2010 made it!