Hi. what is good too start with as my first litle program something simple?
Depends on what you've done so far. Have you made "Hello World"? If not that's really the starting point of any programmer, and are you programming with Python? It's a great choice for a first language.
I'd try making something simple, employing print statements and perhaps an if statement or control loop. Just some small experimentation to get yourself comfortable with what the language has to offer.
EDIT: Did some research, this wouldn't be your first language, you're familiar with PHP. In that case, I'd suggest you try making a program that searches files for one kind of string and replaces them with another (just doing what sed does). That's a pretty simple project!
Last edited by ZekeDragon; 09-22-2009 at 02:57 AM. Reason: See EDIT
Wow I changed my sig!
In order for us to answer accurately, we need to know how much you know of python, what you are using to study, and what you have already done.
i only know the basics like if and loop and all that stuff.
so im looking for a simple program but i dont know what to make. it must be wery simple becuse im not that good.
thanks
I think my first python program was a number guessing game. You can try that. The computer generates a random number and you try to guess it. The program should tell you whether your number is higher or lower than the answer.
I always think small encryption programs are nice to make to begin with, as you can expand and build on ideas. Python is a great language for nice little encryption algorithms as well![]()
Throw yourself into the deep end.
This is basically the way I am currently being taught at University, in my Electrical Engineering MEng.
Starts off with Hello World...then a simple guessing game...then i had to create an encryption algorithm, including letter-frequency analysis (kasisky or similar i believe is the term) to solve the encryption.
I also had to do a simulation with 2GB of data concerning Wind Farms (more topical to my degree...so i volunteered to do this when i finished the first project early)
I have to say, what helped me the most was having a scan through the Standard Library, and looking at google for a point in the right direction.
If you can look at a code descriptor and work out how to make it work, or atleast give someone an idea that you've bothered to attempt it yourself.
As for "simple", if you do any high(ish) level mathematics, you could code the process of matrix multiplication, including checking wether the inner bounds of the matrices are equal to allow for multiplication. It should be a relatively small program, perhaps 10-20 lines of code for a simple loop with pre-formatted data, but it should set you on the right track, and give you a good introduction to control structures.
Challenge yourself, learn on the job, you'll improve more.
My first programs were the number guessing game, then a phone book that takes names, addresses, numbers and stores them, then recalls them for later. early on i wrote a program for teaching someone morse code, was pretty simple (considering i didn't know it?) just googled a quick translation table. number guesser is definately a good start tho.![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks