Well if you were like me and Python is your first language. You are trying to learn programming and many people suggested that learn Python as a first language. You take their advice, your download Python and get all set up. Maybe you take a tutorial or two in order to learn some basic syntax... Now you are sitting in front of your computer and you are wondering what to do next. I suggest you start on some projects and get programming to learn more Python. I have created all the projects myself, and will include the source code in this post. Refrain from looking at the source code, even when your stuck. If you get to the point where you have nowhere else to look, take a tiny peak but then go straight back and start doing your work again. If your programs works and our source code doesn't match, pat yourself on the back! Then look at my source code versus yours and see how you can shorten or make your programs better. My way of doing it is probably not the best way, experiment!
1) Guess My Number: Overview: The computer randomly generates a number. The user inputs a number, and the computer will tell you if you are too high, or too low. Then you will get to keep guessing until you guess the number. What you will be Using: Random, Integers, Input/Output, Print, While (Loop), If/Elif/Else My Thoughts on Project: If you are new to Python this is a great learning experience, remember the code you used here and how you used it. This will help your natural learning curve into Python. Download my Source Code: http://www.mediafire.com/?iahny9tgk0m
2) Sentence Generator: Overview: A series of different parts of sentences will be randomly put together to come up with new interesting sentences. What you will be Using: Random, Integers, Print, Strings, Breaks, Functions, For, Range My Thoughts on Project: A very fun beginning project, have fun with this... Come up with some wacky sentences! Also, this project really gets you to experiment with strings, piecing them together, randoming from a set of strings, and more. Download my Source Code: http://www.mediafire.com/?2dhtt0ynjdy
3) Area Calculator: Overview: The user will be prompted with a menu where he/she will select a shape. Then the user will give the appropriate information needed to solve for the area, and the computer will give the area! Hope you all have taken geometry! What you will be Using: Input/Output, Integers, Variables, Strings, Print, If/Elif/Else My Thoughts on Project: Great if you understand geometry and want to write a program that will do a little homework for you! This program is great for learning variables and creation of math related projects. Download my Source Code: http://www.mediafire.com/?m2mm2mjxiy9
4) Address Book: Overview: The user wants to create an address book and downloads your program. How would you make it? Create a program that prompts the user for the information in most address books and then stores it in a .txt file! What you will be Using: Input/Output, Print, Python File Commands, If/Elif/Else My Thoughts on Project: This is a great intermediate Python project once you are really going with Python. This will teach you how to access files, edit them, save them, delete them, and more. If you get stuck you can look at my source code but I strongly suggest that you use Google and then try to apply what you find into your program. Download my Source Code: http://www.mediafire.com/?fy9mx3w02dz
5) Text Game: Overview: A complete text game, be able to move through rooms on users command, get descriptions of each room, be able to interact within rooms, be able to gain items to gain treasure in your game. I suggest you make your game with as little as 6 rooms with the user moving walls or rocks in order to get an item which they will use to get another item, in order to get the treasure and complete the game. What you will be Using: Strings, Variables, Input/Output, If/Elif/Else, Print, While (Loop), Lists, and more My Thoughts on Project: By far the project you will learn the most from, don't be afraid to look at my source code. But don't make a clone of my game, make your game original and unique; my way of setting up the rooms and how the descriptions are read should not be the way you do it. There is more than one way to do it in Python, take advantage of it! Download my Source Code: http://www.mediafire.com/?zfiw2joyzoy
I hope this helps for everyone learning Python! I will be adding 5 more projects that you should make after these in a follow up thread. These projects include: Morse Code Translator, A Cryptography Encoder and Decoder, Text Black Jack Game, A Tkinter GUI program, and A Coloring Program (Tkinter)!
great advice that of starting a project to practice, experiment and refine what you have(are) studied! I was in your same situation and, after reading a bunch of books and doing several tutorials, I thought "how can I use what I've learnt? How can I learn more in a more personal and practical way?" What I did was starting working on something which could turn out really useful for my job, that wasn't just theoretical stuff. The company I work for uses excel sheets as price lists for certain type of machines and options, so I just started creating a simple price list which could work only with the interpreter. Then I created a GUI using Tkinter. Then I began to implement reportlab module to print pdf reports for customers. After that I thought it would have been nice to merge all the different price lists under a single interface and eventually I discovered I could use the xlrd module to fetch the data for my price lists from an excel file. I faced lots of problems to arrive where I am now and many other problems are just behind the corner. However I solved all of them and, the most important, I've learnt a lot. So let's follow inkcoder advice and start your own project. You'll learn faster and better.
Totally agree -- come up with some practical or interesting idea for a program, then just try to do it. You won't know what kind of knowledge you need when you start, so it'll be an adventure of learning. Way more fun and helpful than slogging through tutorials.