












Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!













Some facts about the Nokia N
Why Python?
Why not Python?
A quick way to test your installation
Using scripts
Some syntax examples (numbers, strings)
>>> int(2.6) 2 >>> s='hello' >>> s 'hello' >>> print s hello >>> print s,'world!' hello world! >>> print s+'world!' helloworld! >>> s[1] 'e' >>> s[-1] 'o' >>> s* 'hellohellohello'
Some syntax examples (lists)
Some syntax examples (if/else, for)
Some syntax examples (while, functions)
(^) While
(^) Functions (think of these, too, as objects) >>> i= >>> while i<4: ... print i ... i=i+ ... 1 2 3 >>> def f(n): ... print 2*n ... >>> f(5) 10 >>> f('tim') timtim >>> f
>>> g=f >>> g >>> g('andrea') andreaandreaMore information
Emulator
An important note
Acknowledgments