Thursday, 19 April 2012

Simple Calculations in Python

Simple Calculations




Let us do a simple sum
We will make 3 variables.
box, bigbox and answer. We will put 2 in the box, 12 in bigbox and nothing in answer.
Here is the code
box = 2 # Put 2 in a variable box
bigbox = 12 # Put 12 in another variable box
answer = 0 # Here is an empty box containing nothing
answer = box + bigbox
print "The answer is ",answer

Now its your go.

Make three variables, first , second and result.
Put 2 in first, 3 in second and nothing in result.
Add the numbers up in the program and then print the answer.

Monday, 9 April 2012

More Python Programming

The Python Programming tutorial continues. Looking at simple variables, and using them in simple loops. Counters and loops are important to programming. They for the basis of most of the programming structures.

So what is a variable?
These things are what makes computer programes work
Lets us see if we can make some

Variables are little boxes inside the memory of the computer that store things.
Lets make on and put something in it.


Here is a simple program
box = 1 # Put 1 in a box
This line makes a variable box and puts the number 1 in it.
print box
We Print out what is in the variable box.
Here is the code
box = 1
print box
What's that thing after the 1
This is a comment. It doesn't do anything for the program. It is here to help you understand what is going on.
Lets make the program a bit easier to read.




There are solutions and more on the website
http://www.philipmrussell.co.uk/raspberrypi/programming/variables.html



Wednesday, 28 March 2012

Python Programming

A new series of Python Programming is available on http://www.philipmrussell.co.uk/raspberrypi/programming.html
Using a simple character I am writing this for younger students of all ages, covering some simple basics.
The pages have the code to cut out and paste into your editor to save you the typing. There are a few exercises to get you gong. Each week a new set will appear.

Friday, 9 March 2012

Problems upgrading Avast AIS all solved

We run a small network of 10 or so computers on a network. They all run Avast which is controlled by the Home Server.

The system had been running happily for a while. I bought a new ASUS laptop and this had problems with a connection speed when writing on the network. I reckoned it was the Antivirus causing the problem, so I removed it. Unfortunately when the Antivius was removed it seemed to take all the network drivers with it and therefore the network connection. So I restored rthe machine and we limped on with no bgackup and a poorly working Antivius that could not be uninstalled and would not update.

A few days later out came AIS 7. I did the upgrade on one of the Windows 7 machines and all went well.. So the net day I set all the other machines off on an upgrade. They all locked up.

After a support called to Avast they send and unlocking program which allowed all but three of the machines to upgrade sucessfully.

That left three others that would not upgrade and the ASUS still in limo saying that this fix wasn't right for it.

With an open fault I replied to Avast and with a hour or so a suggestion was made to try the new updater. It immediately solved the ASUS problem, which now had AIS7 running happily on it and it could happily back up to the Home Server.

The final two machines were sorted out a few minutes ago but a new awsclean file which did the trick enabling all the machines to run AIS7. Good Customer support has made me feel happy with the product.

We started using this product because of the Home Server can control and monitor the Viruses on the Network. We will probably continue to use Avast because of the good support, and its general reliability.

AIS 7  seems to work well with a few new features which I can see me using.

Monday, 27 February 2012

Raspberry Pi

The Raspberry Pi Foundation is a UK registered charity (Registration Number 1129409) See Website
The Raspberry Pi is for me an ideal computer. I started computing with a TRS-80 in 1980. When I bought that computer and switched it on my Mum, said what is this,  ask it who was the Queen of England in 1654?

Now that machine would only do BASIC and only what I could program it to do. Before I could do anything I had to learn to program. Within a few weeks I was writing complex programs to do all sort of things.  As a computing teacher I have had many students in my class who could use a computer , but whom had no idea about what you could get a computer to do.

I feel like many that this computer is a great step forward by taking a few steps back.

I sat in ignorance of this computer until this morning when Linux Format came through my postbox.

This seems the ideal computer for education. A small Linux platform and a simple programming language. Costing $35 dollars for 256Mb RAM, 2 USB port, an Ethernet port, an ARM1176JZFS, with floating point, running at 700Mhz, and a Videocore 4 GPU. The GPU is capable of BluRay quality playback, using H.264 at 40MBits/s..The Raspberry Pi measures 85.60mm x 53.98mm x 17mm, with a little overlap for the SD card and connectors which project over the edges. It weighs 45g.

The first shipments are with out a case which makes the computer look more like a machine that can be played with, than a black box. Later versions will have a case.

The computer has no keyboard ( so one needs to be supplied ( although it would probably fit inside one, no monitor ( any HDMI monitor TV will do) or disk. The OS is on a 16Mb or 32Mb full size SD card. The power is from 4AA cells or a small power supply a a mini 5V USB  (phone style) connector.

There is already an enthusiastic following and video's up on You Tube to look at.

At the launch in a week or so's time there is another addon board, (the Gertboard) which will allow the user to use GPIO ( General Purpose Input and Output) and the ability to add any other hardware to the computer for a truly fantastic IO  experience.

Because of its small size this computer will probably find its way into all sorts of other hardware, becoming  the computer controller  for many familiar devices.

Many years ago I was involved in creating a Beowulf cluster. With the Raspberry PI this might again became a great possibility. My students learnt an enormous amount from being able to build such a cluster. By having small inexpensive computers the way to opened up to users to discover how all types of computer systems work. Instead of having to buy several servers, the same systems could be created for well less than £100.

What can the added to the system.

Would be developers are talking about adding touch screens and other devices to the Raspberry. The appeal is a machine that is very basic - that will teach the basics of computer hardware and software. The appeal of this machine might just see it appearing in every device you can think of.