### Preview lessons, content and tests

#### Computer Science & Programming solved. All in one platform.

1. To trial the platform and take tests, please take a few seconds to SIGN UP and SET UP FREE.

2. Searching for something specific? See our text overview of all tests. Scroll right for levels, and lists.

3. Student and Teacher User Guides |  Schemes of Work |   Real Teacher use Videos |

Join 36000+ teachers and students using TTIO.

### Algorithm Efficiency

Say you were making a cup of tea ...now, ordinarily you wouldn't need to follow an algorithm to make said cup of tea, but suppose you were a robot and needed instructions ... consider for a moment how important the efficiency of the algorithm would be. Space and time are things that humans are always worrying about!

### PowerPoint Presentation

a) Check out the following trinket. Enter different numbers and note what it is doing. For instance, if you input the number 3, the output is 6. (3+2+1). Now put in a bigger number - note that it records the time taken to complete the transaction. Try a REALLY big number - what happens?

b) Super challenge: Can you re-write the python code to make the calculation happen instantly? Seem impossible? The presentation contains the answer, but see if you can do it yourself first!

### What do we mean by efficiency?

Well, we mean things like TIME and SPACE and often times these two things have a big influence on each other. Definition: Algorithmic efficiency are the properties of an algorithm which relate to the amount of computational resources used by the algorithm. Analgorithm must be analysed to determine its resource usage.

The importance of efficiency with respect to time was emphasised by Ada Lovelace in 1843 as applying to Charles Babbage's mechanical analytical engine:

`"In almost every computation a great variety of arrangements for the succession of the processes is possible, and various considerations must influence the selections amongst them for the purposes of a calculating engine. One essential object is to choose that arrangement which shall tend to reduce to a minimum the time necessary for completing the calculation"`

www.teachyourselfpython.com