Comment Re:Sorry, but scheme looks like garbage (Score 1) 384
Ok, well let's try that in Java :
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class CalculateCircleAreaExample {
public static void main(String[] args) {
int radius = 0;
System.out.println("Please enter radius of a circle");
try
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
radius = Integer.parseInt(br.readLine());
}
catch(NumberFormatException ne)
{
System.out.println("Invalid radius value" + ne);
System.exit(0);
}
catch(IOException ioe)
{
System.out.println("IO Error
System.exit(0);
}
double area = Math.PI * radius * radius;
System.out.println("Area of a circle is " + area);
}
}
To be honest, that will completely turn him off to programming. You have to teach so many things about syntax, exceptions, objects and imports that you can't even print something out without at least 6 hours of lessons. Never mind telling them how to compile something like that. Kids need to play with the computer, to see results right away, and Scheme lets them do this right away. Java, C and the rest of the compiled languages are just too steep a learning curve to give the average 9th grader. Give them Scheme first, the rest will be easier.