background preloader

Introduction to Electrical Engineering and Computer Science I

Introduction to Electrical Engineering and Computer Science I

Ressources Python Ressources didactiques Gérard Swinnen Vous trouverez ci-dessous : en téléchargement libre, les versions numériques de l'ouvrage "Apprendre à programmer avec Python" de Gérard Swinnen (troisième et cinquième éditions), anciennement publié aux éditions O'Reilly et dorénavant édité chez Eyrolles (ISBN 978-2-212-13434-6) ; le code source des exemples et exercices proposés dans le livre ;Les diapositives et le code source des exemples présentés par G.Swinnen au colloque "Libr'East of Paris" (IUT de Marne-la-vallée) les 23 & 24 Avril 2004 ;Les diapositives de la conférence sur Python présentée à l'IUT de Vannes (Université de Bretagne Sud), le 15 Avril 2005 ;La traduction du livre en hongrois (+ lien vers le site web du traducteur).La traduction du livre en arabe (+ lien vers le site web des traducteurs). Les deux dernières éditions traitent de la version 3 de Python. Au sommaire : Préface. *** Traduction hongroise *** Merci infiniment, Péter ! *** Traduction arabe *** ... Téléchargements

2. Using the Python Interpreter — Python v3.3.2 documentation 2.1. Invoking the Interpreter The Python interpreter is usually installed as /usr/local/bin/python3.3 on those machines where it is available; putting /usr/local/bin in your Unix shell’s search path makes it possible to start it by typing the command: to the shell. On Windows machines, the Python installation is usually placed in C:\Python33 , though you can change this when you’re running the installer. set path =% path % ; C : \ python33 Typing an end-of-file character ( Control-D on Unix, Control-Z on Windows) at the primary prompt causes the interpreter to exit with a zero exit status. The interpreter’s line-editing features usually aren’t very sophisticated. The interpreter operates somewhat like the Unix shell: when called with standard input connected to a tty device, it reads and executes commands interactively; when called with a file name argument or with a file as standard input, it reads and executes a script from that file. Some Python modules are also useful as scripts. 2.2.

Building Skills in Python — S.Lott v4.2 Site How do you learn Python? By doing a series of exercises, each of which adds a single new feature of the language. This 450+ page book has 42 chapters that will help you build Python programming skills through a series of exercises. This book includes six projects from straight-forward to sophisticated that will help solidify your Python skills. The 2.6 edition was significantly revised and expanded to cover Python 2.6 and some elements of Python 3.1. The current release has benefitted from a great deal of support from readers who sent detailed lists of errors and suggestions. Professional programmers who need to learn Python are this book’s primary audience. Since Python is simple, we can address newbie programmers who don’t have deep experience in a number of other languages.

Lesson 3 - Programs in a file, and variables Introduction Well, we can make one-liner programs. So What? You want to send programs to other people, so that they can use them, without knowing how to write them. Editing in Notepad Writing programs in python to a file is VERY easy. Code Example 1 - mary.py #A simple program. print "Mary had a little lamb," print "it's fleece was white as snow;" print "and everywhere that Mary went", print "her lamb was sure to go." Keep this exactly the same, down to where the commas are placed. Using the IDLE Environment Now, open up the Python IDLE program (should be in your start menu). Code Example 2 - mary.py output Mary had a little lamb, it's fleece was white as snow; and everywhere that Mary went her lamb was sure to go. You can also use IDLE to create Python programs, like what you did in notepad. There are a couple of things to notice here: First of all, the comment wasn't shown. Variables Now lets start introducing variables. Code Example 3 - Variables Strings Code Example 4 - Strings Conclusion

Dive Into Python 3 You are here: • Dive Into Python 3 Dive Into Python 3 covers Python 3 and its differences from Python 2. Table of Contents (expand) Also available on dead trees! The book is freely licensed under the Creative Commons Attribution Share-Alike license. you@localhost:~$ git clone © 2001–11 Mark Pilgrim

Learn Python - Free Interactive Python Tutorial

Related: