--------------000802090108000409010104
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

This is the first Ruby Quiz I have tried and I'm glad to have done
it :). Attached is my solution to the quiz.

Cheers.
- --
BASIC is to computer programming as QWERTY is to typing.
                -- Seymour Papert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEnrg/mV9O7RYnKMcRAhReAJ48f6EzmH0SfskdFCzox+v3VAvUiACeMFd6
pcnMckae8KWvkg7nj4Kxd38
nD
-----END PGP SIGNATURE-----

--------------000802090108000409010104
Content-Type: application/x-ruby;
 name4.rb"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename4.rb"

PWJlZ2luCglDb3B5cmlnaHQgMjAwNiBTdXJhaiBOLiBLdXJhcGF0aQoKCVRoaXMgcHJvZ3Jh
bSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IKCW1v
ZGlmeSBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNl
bnNlCglhcyBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0
aGVyIHZlcnNpb24gMgoJb2YgdGhlIExpY2Vuc2UsIG9yIChhdCB5b3VyIG9wdGlvbikgYW55
IGxhdGVyIHZlcnNpb24uCgoJVGhpcyBwcm9ncmFtIGlzIGRpc3RyaWJ1dGVkIGluIHRoZSBo
b3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsCglidXQgV0lUSE9VVCBBTlkgV0FSUkFOVFk7
IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZgoJTUVSQ0hBTlRBQklMSVRZ
IG9yIEZJVE5FU1MgRk9SIEEgUEFSVElDVUxBUiBQVVJQT1NFLiAgU2VlI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