I have made 10 worksheets with some algorithms (in Python).

Sharing just in case anyone wants to use one (could be given as a homework, I guess).

Algorithms

1: A. M. Legendre, exponentiation by successive squaring.

2: Heron of Alexandria, square roots

3: Peano arithmetic

4: Zeller's congruence

5: Factorial

6: Fibonacci numbers

7: Euclid's GCD & prime factors

8: Eratosthenes' sieve and the Miller-Rabin algorithm

9: Pascal's triangle

10: Tau using Gregory and Euler's equations

The .tar.gz and .zip files include .pdfs and the code examples.

algorithms.tar.gz

algorithms.zip

## Algorithms worksheets

5 posts

**Posts:**406**Joined:**Sun Nov 20, 2011 11:37 am

Thanks for this I think I'll be able to work them into a GCSE computer science scheme of work quite nicely.

Just had a slightly more detailed look, the worksheets really are rather good!

Out of curiosity , what led to you making them?

Out of curiosity , what led to you making them?

I was mainly inspired to put this together because of reading The Structure and Intepretation of Computer Programs, by Abelson and Sussman.

I do teach some CS, but using SmallBasic, not Python. so this was just "for fun"!

I do teach some CS, but using SmallBasic, not Python. so this was just "for fun"!

**Posts:**406**Joined:**Sun Nov 20, 2011 11:37 am

I've made a few more examples in this series of maths / algorithmic worksheets:

Algorithms - Series Two

1. Newton's method for nth roots.

2. Primes revisited

a) faster Miller-Rabin

b) Lucas-Lehmer number

3. A Little Number Theory

a) Ramanujan's Highly Composite Numbers

b) Ramanujann and Hardy - roundness

c) Pythagoras - perfect numbers

d) Pythagoras - friendly numbers

4. Pi

a) Euler's method for calculating Pi

b) Cesaro / Monte Carlo method

5. The RSA algorithm

You can get the pdfs and the code examples here.

Algorithms - Series Two

1. Newton's method for nth roots.

2. Primes revisited

a) faster Miller-Rabin

b) Lucas-Lehmer number

3. A Little Number Theory

a) Ramanujan's Highly Composite Numbers

b) Ramanujann and Hardy - roundness

c) Pythagoras - perfect numbers

d) Pythagoras - friendly numbers

4. Pi

a) Euler's method for calculating Pi

b) Cesaro / Monte Carlo method

5. The RSA algorithm

You can get the pdfs and the code examples here.

**Posts:**406**Joined:**Sun Nov 20, 2011 11:37 am