Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révisionLes deux révisions suivantes | |||
teaching:informatique [2012/01/23 16:44] – créée villersd | teaching:informatique [2012/06/19 12:09] – villersd | ||
---|---|---|---|
Ligne 6: | Ligne 6: | ||
Les détails du cours (fiches ECTS) sont disponibles à partir des pages web des [[http:// | Les détails du cours (fiches ECTS) sont disponibles à partir des pages web des [[http:// | ||
+ | |||
+ | Voici un petit exemple de programme Python : | ||
+ | <sxh python; title : Hello_World_python_program.py> | ||
+ | # | ||
+ | # -*- coding: UTF-8 -*- | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # and some more stuff. | ||
+ | # | ||
+ | #date :20120501 | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | """ | ||
+ | Documentation (DocString) : | ||
+ | This small program will output the 'Hello World !' string. After that | ||
+ | he will ask to enter some words that will be echoed. | ||
+ | """ | ||
+ | |||
+ | Phrase = 'Hello World !' | ||
+ | print Phrase | ||
+ | some_words=str(raw_input(" | ||
+ | print 'OK, you just said me "' | ||
+ | </ |