- be executable - (optional) take input from somewhere (e.g. stdin, or command line arguments) - (optional) write output (e.g., print statements)
Would you be able to write a small script that implements solutions for Project Euler? (Even just a few of them.)
- You don't need any input at first, because the problems are already specified. - You can write a separate program for each problem, or just comment out calls to each exercise's solver - Brute force is OK for many early problems - You probably know enough to write a function that solves an easy one (e.g., Nth fibonacci number)
Once you write such a function, you should be able to find out how to write an executable program in your language, and then you're off to the races: Run it over and over from the command line until you (a) stop getting errors, and (b) get an answer that you can defend and understand. :)
Do no stop to think if it's any good, neither stop to plan ahead what it will look like. Not on your first few programs.
1. consume input 2. do work 3. print output
find a small but interesting piece of work to do and code that. repeat several times. there are sites that provide you problems to solve if you don't have any ideas of your own (like project euler).