We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 195
PythonAion eo The Complete
eee As Build Your
ene
FRITZ!Box
_ Manual
The Complete
Aire
Canon
Manual
Google
y The Complete
Linux
ManualiS PPD) return!0}).ont
ment, 65)}), !1}}(5Q . tien Hale
reese aaa eet esti (a)| G
Teen east Oy) tests (a) {va
jters_Form_container_Selector) ; (a, function(c,d){b 7
(arninet: ),function(c,d){d=$(d);var f=d tan f (omar east
d.prop("checked”,"")})}function esas ome east oe
1ters_Form_container_Selector). \(".filter-cont select”).eac (function(){var b=$(this).: a
'b) -length;0 »
1 ~ Be
@ s Oy
cra) \
PsPrint ("The W
Where to start learning how to code?
Remarkably, this is the most difficult
step. There are plenty of programming
languages out there, and a seemingly
unlimited number of tools to help you
achieve what you want; but where do
you begin?
Inthis section, we look at what you will
need to take those first tentative steps
into the world of coding. You won't
suddenly become a programmer in
twenty-four hours, learning how to code
Properly takes time and patience. But
with alittle help, you can master the
basics and start your coding journey.
Being a Programmer
Aref History of Coding
Choosing a Progamming Language
Creating a Coding PlatformJ) Print ("The World of Code”)
Being a ProgrammerTimes have changed since programming in the 80s,
but the core values stil remain,
“It’s up to you
how far to take
your coding
adventure!”
MORE THAN CODE
For those of you old enough to remember the'80s the golden era ofhome
‘computing, the world of computing was a very different scene to how itis
today. Bit computers that you could purchase as a whole, as opposed to
being in kt form and you having to solder the pars together, were the stuff
‘of dreams; ane getting your hands on one was sheer bis contained within
large plsticbox. However, it wasnt so much the new technology that
‘computers hen offered, moreover it was the fact that fr the ist time
‘ever you could control what was being viewed on the ‘television.
Instead oF simply playing one ofthe thousands of games available 2t the
time, many users decided they wanted to create their wn content, ther
‘vn games; or simply something that couldhelp them with theirhomework
‘orhome finances. The simplicity ofthe &-bithome computer mean that
‘creating something From a Few lines of BASIC cede was achevable and so
the frst generation of home-bred programmer was born.
From that pointon, programming expanded exponentially Ie wasn' long
before the bedroom coder was thing ofthe past and huge teams of
signers, coders artists and musicians were involved in making asinle
‘game. This of course led tothe programmer becoming more than simply
someone who could fashiona sprite on the screen and make it move atthe
press Fahey.
‘Naturally, ime has moved on and with tthe technology that we use
However, the Fundamentals of programming remain the same; but what
exactly doesit take tobe 8 programme?
“The single most common trait of any programmer, regardless of what
they're doing isthe abiityto see alogical pattern. By this we mean
someone who can lojcally follow something from stat to Finish and
‘envisage the intended outcome. While you may not Feel youre sucha
person, itis possible to train your brain into this way of thinking, Yes, it
takes time but once you stare ta thinkin this patieular way you wil be able
toconstruct and fallow code.
Second to logic isan understanding of mathematics. You don't have tobe
‘ata genius evel but you do need to understand the rudiments of maths.
Maths sall about being ableto solve a problem and code mostly Falls under
the umbrella of mathematics.
eng able to see the big pictures certainly beneficial forthe modern
programmer. Undoubtedly, asa programmer, you wil be part of a team
‘oF other programmers, and more than likely part oF an even bigger team
of designers, allo whom ae creating 2 final product. While you may only
be expected o create a small element of tat final praduc, being able to
Understand what everyone else s doing wil help you create something
that's ultimately beter than simply being locked in your own coding cubicle
Finally, there’ also level of creativity needed to bea good pragrammer.
Again though, you dont need tobe a creative genius, ust have the
Imagination tobe able to see the end product and how the user wil interact
with
“Theres of course slot more invalvedin being 2 programmer, including
learning the actual code sel. However, with time, patience an the
to:
Programming soc
Language
Tata h eianieccisched iesa 7
SL pac CC eC
a single book of this size. New languages
and ways in which to ‘talk’ toa computer
Ae thal aes EDLs)
Peet clea hina
Cis eeme teeta neat
Pom et accessed scans cic
isa list of the more common languages
Ele Rane are
-Scene.objects
ed™ + str(mc
ob.select =
mel she > 4 ee 8
Ce
elect
TOR CLASSESa {|e
ue Celera
ea 'SQL stands for Structured Query Language. SQLis a standard language
peer erie sr toe nt eee)
(American National Standards institute) standard, there are different versions of
Pek ee a omer ee ene res es
‘commands such as Select, Update and Delete ina similar manner.
ee soe ees
eee sear are etter
Functions JavaScript runs onthe cent side ofthe web, that can be used to design
Sr ee eee eee eet
eo ae eee ea tare ete eared
Seis
Pa Java isthe Foundation For vitually every type oF networked application
Boe peice ec ea
based content games and mobile apps. The twomain components of the Java
ee oe eed
ee eee
See eee ee eed
ee eee me eet antes
Framework. You can use Cito create Windows ent applications, XML Web
See ao eee ee
esas ce nea ee Cul ais
nea
Ree uremia tien
roe cu cee Tern)
Pe Reger en ce
Se ee ee ee eon)
eee ea ene a ee Seton
onesies
Se ortee aeeee secu)
ee eee
Features. Ie was designed with a bia toward system programming and embedded,
pentane eee eet ee eters
ereer ses
ca Coe ae mcs
ere eee ree
ene iene ke eee eet eet Steet Tey
Ruby has drawn devoted coders worldwide, Ruby s seen asa flexble language;
Peres rent nae eis rT etc?
pers)
“PERL Cr ee au ee ee ee
range of tasks including system administration, web development,
ee cen ene gets
Pete si ect e bse lee era ad
Pore reg eer er ee ees
resect eet es
cae Se Ca a ea ed
peter MeN ee ete ead
eee eer en ee eas
‘developers love, Swife codes safe by design, yet alo preduces sofware that uns
Pie ete ea ee eae
sombdnoibicionsson GSTld of Cod
| Pine The
Creating a
Coding Platform
HARDWARE
Thankful, coding atthe
Foundation level doesnt
require specialist equipmen
or atop of the range, quid
hycrogen
try
Ehass ¢ = class. forvameC args(0] ):
Nethad'w—crgetMethodt args(l), new class
PRaey
Object ree = meinyokeC mul, nut? 5
Systen.out printinc
"Zgvokae. evatis nethod: " + args(i]
+ Gfeiass: |S args[0]
ft wich no aros\onesules: * + ret 95
» catch ¢ Catelontotadencepeion e 5 f
Hake Hermamee Fee Hind che class
» Lesh Piosittne nodes on 62'S C
1 eae Hee eatin
eens Tite ieee Sateon os
77 we don't Rave permfesion 5 Invoke that
» rec rs >
SECS amvocactontargetsyeeption
if an Sectpeion coved aiiie tavek iy Shae
Cesaattcere 7
SySt2a,oveprincine
Method! threw sn: + ef,
‘getTargetexception( *)")!
>
b
Javaisa powerful
language that’s used in
web paces, set-top boxes,
TVsand even crs.
( why Python? E »
Python was created over twenty sk years ago and has evolved to
become an idea begiane* language Fr tearing now to program 3
‘computer. Ws perfec forthe hobbyist, ertnsast, student, teacher
‘ane those who simply need to create ther ov uniaue interaction
between etter tnemselves or apiece of extemal hardware and the
computer isl
Python's free todoumload, install and use ais avallable for Linux,
Windows, mae05, MS-DOS, 05/2, BOS, IM iseres machines, and
‘even RISC OS. I¢has been voted cne ofthe top Five procramming
languages nthe world ands continually evolving ahead ofthe
hacaware and Internet development curve,
‘Soto answer the question: why Python? Simply pu. it's Fee, eas) to
learn, exceptionally powerful, universally acceptey efectiveand a
superb lesming and educationaltoo
(Gh Basic war once te tare tngunge they
Fe hic home computer wer lamed
Python isa mere modern take on BASIC it's easy to learn
and makes Foran ideal beginners programming language.
woatdnabiaioncs QTFa
What can You
Do with Python?
Cen ee eie eRe eee ne ee Ce eel)
Pee Ean acon un iuelec sea tae
characteristics that help make it such an important language to learn.
ieee
ee ee
wold, From the ideal fst procrammers‘choice tol’ abilty to
Crete enemies
ete ee he eee a oe ae ey
pee es
er ey ie
ee rae cerca eereereenaed
eee tate er eee err
Cle ieee nein onerd
Pe Roeser EE Sed
eae mene eer n etry
Cee ante een
Gee eee area
De fee en ety
ee eee cen eee tea
eA
Ere eer eer eet ges
eee ten ee
Pe eee cere ee eget
it'snotjustUmited to those areas, big daa is currently being used in variety of
Cees ese ee eee eer eee nr
eo loor
eee ed
pete err teas cae)
Ee eta nee aes
eer caren ete eee eer tay
eres amet ton ee rea eee err
Reentry
Se er en en ee
en eet
Ce eee et neta
Seal Eocene eee
tut Python ispresent help sft through the data so scentsts can get tothe content
‘ey want without the need to learn afar more complex programming languageuae eee a
Cee ee aed Polliis alsa
ete eee eee ee
eater oem ice era tee td ae ey
Cee er eels ets
ee eet eich ei’
Penrose ria
ieee
eee cee eed
een enous read
Orie ee Tee ae
nee tetas
Fram the actions oF same Form of input and anticipate what
Eee artes
This model can be applied to Facebook. Google, Twitter,
reuse recs ny
eer cee cg
‘social media platforms are now specically targeted toward
Sek arr
Set oe ee a
Bee rete ures
Se ee ea A ‘ndsoo many
SL ate atetiemreerian ClO] . maybe suprised
offer playlists based on what youve listened to
are eer) :
eerie eee ;
asso eseerureatet nin v osciptean aid
eit ees
eaten eis
‘Web development has moved on considerablysnce the early
clays of HTML scripting ina imited text editor. The many
Frameworks and web management services available now
‘means that building 2 page has become increasingly complex.
miei
the boc
with Python the web developer has the abilty to create
dynamic and highly secure web apps, enabling interaction with
‘other web services and apps such asinstagram and Pnterest.
Python als allows the collection of data from other websites.
‘and even apps bult within other websites.
Paton avs.an 4
Foecaetebeer coer pen
‘able to take you into the next generation of a
ieee
patie
Cenc ere cans
eer er
Pacem
ne