1st Charm;

As mentioned python is deemed to be the ‘swiss army knife’ of programming and coding – I suppose it’s versatility is hard to contest. We can code anything from simple computer games to robots and weather stations . Letys have a look at a very simple introductory line of python code , this can easily be done in LX terminal on your Pi. Boot up your Raspberry Pi and logon as normal but do NOT start up Desktop – stay in terminal  type in the following command (this creates a blank document called ‘hello world’) :

sudo nano helloworld.py

in your new document window type the following line:

print "Hello World"

then hit to save ; answer yes and exit.

Type in the following command : sudo nano helloworld.py

Screen Shot 2014-10-10 at 13.57.06

Type : print “Hello World” , then hit ⌃+ x to save and exit.

Now in terminal type the following code to run your 1st python program:

sudo python helloworld.py

Screen Shot 2014-10-10 at 14.00.11

And voila – here’s your first python script running, might not be terribly advanced but YOU did it by yourself , well done.

Let’s do something a little bit more advanced in lesson number two.

Thanks to Matt from RaspberryPiIVBeginners for very excellent video tutorials.
. . . share the geek love . . .Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInPin on Pinterest

Leave a Reply

Your email address will not be published. Required fields are marked *