Q:

Easy Questions for Teaching Pascal to a kid

I've been asked to tutor Pascal to a kid. Despite never seen Pascal before I did manage to get a tutorial and I now know enough to teach him.
I am writing you guys to see if anyone can point me out some basic exercises that involve simple algorithms, Something like: Sort this array, find the average, etc...
It can be in any language, I just need to find some exercises so he can work out.

A:

Here is a list of 15 Exercises for Learning a new Programming Language from freelance that expands on basic techniques used in many languages and can give him a feel of the new lanaguage he's learning

A:

I am going to address this in a (mostly) language-agnostic fashion. After teaching him print statements and flow control (if statements, for loops, etc.), my suggestion would be to start off with simple ASCII-art patterns that can be generated by for loops and such.
For example, how would you print half of a tree, like this?
*
**
***
****
*****
******

Alright, now how would you print a full tree, like this?
     *
    ***
   *****
  *******
 *********
***********

Now try drawing a rocket ship. ;)
These are great for most kids because they are visual, the results are enticing, and the exercises will impart the importance of loops and eliminating redundancy.

A:

For sorting algorithms see link. It is a Wikipedia article - a little general information on sorting algorithms, but down below you have links to every type of them individually, and algorithms in pseudo code (and some languages).
As far as "find the average" goes, when you've got "n" elements:
SUM=0.
DO i=1,n
 SUM=SUM+element(i)
ENDDO
AVRG=SUM/n

Also, for learning purposes and thinking Project Euler is very nice.

Also, do take a look at this question:
Where can you find fun/educational programming challenges? I didn't want to copy paste everything, but it has a bunch of links with stuff for exactly what you're looking for (programming exercices). And this: Algorithm Questions Website, What are your programming exercises?. You'll probably find something you think he'll be interested in in there.

