Magpi programs


7 posts
by DavidMS » Wed Jun 06, 2012 2:08 pm
Are the programs available as text files [ ie a format that is relatively easy to down load onto Rbpi] from the mag.

Much as I love the thought of going back to the ZX81 days of typing progs in from magazines I do not seem to have quite so much spare time now.....

Sorry if this question has already been asked
Posts: 65
Joined: Fri May 25, 2012 8:48 pm
by rurwin » Wed Jun 06, 2012 2:11 pm
If you download the PDF you can copy and paste the text.
User avatar
Forum Moderator
Forum Moderator
Posts: 2903
Joined: Mon Jan 09, 2012 3:16 pm
by DavidMS » Wed Jun 06, 2012 9:42 pm
Ok but I think you need to download an extra app to be able to view pdf's on the Rpi ?

but more importantly it is a big file 12m given the program text is probably less than 1k.
Posts: 65
Joined: Fri May 25, 2012 8:48 pm
by Jaseman » Fri Jun 08, 2012 8:13 am
I think you are more likely to remember the code by typing it in. As you are most likely to get typo's - this will also help to develop your debugging skills.

Most of the programs are quite short. The magazine does not provide pre-prepared .py files for the Python Pit. I think because these days the younger generation have everything provided for them without having to do any of work - the Raspberry Pi project began in the first place.

There is nothing stopping anyone from making these programs available as downloads - I just think it would be a shame to do so. To get the most from the experience, you should type the programs in yourself.

If you are having trouble with them, please drop us an e-mail, remembering to include a copy of your version of the program, and we will try to assist with pointing out where the errors are.
Posts: 302
Joined: Tue Jan 10, 2012 12:59 pm
by antiloquax » Fri Jun 08, 2012 9:04 am
Totally agree with Jaseman - all the coding tutorials I have read emphasize the benefits of typing the code in yourself. That way you get used to being accurate, which helps a lot when you come to write your own programs.
mark
By the way, a really good fast pdf reader is mupdf.
I haven't checked to see if it's in the repos, but it's easily compiled from source:
www.mupdf.com
I'm using it on my RPi.
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am
by Jaseman » Fri Jun 08, 2012 7:27 pm
I've just finished testing all the python programs from issues 1 & 2 on my new raspberry pi (under debian with python 2.6.6). I'm happy to say that they all work:

Python Programs tested on the pi (Debian Squeeze):

PUTTING TEXT ON THE SCREEN - CHECKED
ARITHMETIC - CHECKED
SPARE ME THE DETAILS - CHECKED - NO DECIMALS!
ALGEBRA - CHECKED
STRINGS OF WORDS - CHECKED
COUNTING WITH FOR LOOPS - CHECKED
COUNTING WITH WHILE LOOPS - CHECKED
LOTTERY NUMBERS - CHECKED
BINGO - CHECKED
STRING ARRAYS - CHECKED
BAT AND BALL - CHECKED
OPEN A PYGAME GRAPHICS WINDOW - CHECKED
DISCO SCREEN - CHECKED
GEOMETRIC SHAPES - CHECKED
THE HOUSE - CHECKED

The only minor glitch was that python 2.6.6 didnt seem to display any of the decimal places in the 'spare me the details' program. If you have later versions of Python, it will be clearer what the int() command is actually doing.

I was pleasantly surprised to see that the bat and ball and house programs both work fine. Therefore if you cant get it to work - you've typed something in wrong - go back and check your code.
Posts: 302
Joined: Tue Jan 10, 2012 12:59 pm
by antiloquax » Fri Jun 08, 2012 9:36 pm
Excellent!
:mrgreen:
Posts: 406
Joined: Sun Nov 20, 2011 11:37 am