Outils pour utilisateurs

Outils du site


debuter_en_python

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
debuter_en_python [2022/01/15 20:00] – [Menu en mode texte python3] gerardadmindebuter_en_python [2025/04/08 14:24] (Version actuelle) – [IDE Python3 en ligne] admin
Ligne 1: Ligne 1:
- 
- 
 ===== Pourquoi apprendre à coder ===== ===== Pourquoi apprendre à coder =====
  
 Le codage, qu’est-ce que c’est ? Il s’agit simplement du langage de programmation informatique. Maîtriser cette nouvelle syntaxe permet de créer des actions et de commander aux machines. Un graphiste peut par exemple concevoir un site Internet, s’il sait coder il est également capable de lui donner vie sur la toile. Le codage, qu’est-ce que c’est ? Il s’agit simplement du langage de programmation informatique. Maîtriser cette nouvelle syntaxe permet de créer des actions et de commander aux machines. Un graphiste peut par exemple concevoir un site Internet, s’il sait coder il est également capable de lui donner vie sur la toile.
  
- +[[https://www.datacamp.com/fr/blog/what-is-python-used-for|À quoi sert Python ? 7 utilisations concrètes de Python]]
  
 Savoir programmer permet ainsi de : Savoir programmer permet ainsi de :
Ligne 31: Ligne 29:
 ======== Le Python ======== ======== Le Python ========
  
-[[https://www.python.org/downloads/|Telecharger python]]+[[debuter_en_python:intro|Introduction à Python]] 
 + 
 +[[https://www.python.org/|Python EN]]  [[https://www.python.org/|{{ :capture_d_ecran_du_2025-01-31_07-57-59.png?direct&400 |}} 
 +]] 
 +[[https://www.afpy.org/| Association Francophone Python]] 
 +   
 +[[https://www.afpy.org/|{{ :capture_d_ecran_du_2024-10-01_09-46-07.png?direct&400 |}}]] 
 + 
 +[[https://www.commentcoder.com/python-fonction-print/|Fonction print en python FR]] [[debuter_en_python:print|print en python ]] 
 + 
 +<markdown> 
 + 
 +[Apprendre python 3 en ligne](https://pythontutor.com/
 + 
 +[Classes et objets en Python3  ](https://courspython.com/classes-et-objets.html) 
 + 
 +</markdown>
  
 [[https://www.codecademy.com/courses/python-advanced-fr-FR/0/1?curriculum_id=5370f030fed2a866a2000001|Pour apprendre le python en ligne: Codecademy EN]] [[https://www.codecademy.com/courses/python-advanced-fr-FR/0/1?curriculum_id=5370f030fed2a866a2000001|Pour apprendre le python en ligne: Codecademy EN]]
Ligne 37: Ligne 51:
 [[https://codeclubprojects.org/fr-FR/python/|Apprendre Python en ligne FR]] [[https://codeclubprojects.org/fr-FR/python/|Apprendre Python en ligne FR]]
  
 +[[http://pythonpourenfants.free.fr/|Python pour les jeunes ]]
  
 [[https://python.developpez.com/faq/?page=Generalites|FAQ Python]] [[https://python.developpez.com/faq/?page=Generalites|FAQ Python]]
Ligne 44: Ligne 59:
 [[https://courspython.com/introduction-python.html| Cours Python débutant FR]] [[https://courspython.com/introduction-python.html| Cours Python débutant FR]]
  
 +[[https://python.doctor/page-cours-python-debutant-documentation|Python Facile FR]]
 +
 +
 +[[debuter_en_python:erreurs|Comprendre et corriger les erreurs en Python]]
 +
 +[[https://compute-it.toxicode.fr/?hour-of-code&progression=python| Python : Comprendre ]]
 +
 +[[https://www.hackinscience.org/|Apprendre Python 3 en ligne avec Hackinscience FR]]
 +
 +[[https://docs.python.org/fr/3/tutorial/|docs python.org FR]]
 +
 +[[https://www.reypatrice.fr/p_ens_article_html/programmation_en_python.html|Programmation en python , Livres , Doc, Tutos avec P Rey]]
 ===== Pygame ===== ===== Pygame =====
  
 [[https://fr.wikibooks.org/wiki/Pygame | WikiBooks:  Pygame FR]] [[https://fr.wikibooks.org/wiki/Pygame | WikiBooks:  Pygame FR]]
  
-[[https://openclassrooms.com/fr/courses/1399541-interface-graphique-pygame-pour-python/1399674-presentation-de-pygame | Apprendre Pygame FR]]+[[https://papsdroidfr.github.io/dev/Pygame-bases/ | Apprendre Pygame FR]]
  
 [[http://sdz.tdct.org/sdz/interface-graphique-pygame-pour-python.html|Tutoriel : Interface graphique Pygame pour Python FR]] [[http://sdz.tdct.org/sdz/interface-graphique-pygame-pour-python.html|Tutoriel : Interface graphique Pygame pour Python FR]]
Ligne 76: Ligne 103:
  
 C'est un logiciel libre sous licence GNU GPL1. C'est un logiciel libre sous licence GNU GPL1.
 +
 +
 +[[https://www.hackinscience.org/|Apprendre Python 3 en ligne avec Hackinscience FR]]
 +
 +=== Visual Studio ===
 +
 +[[https://visualstudio.microsoft.com/fr/vs/getting-started/|Debuter avec Visual studio FR]]
 +
 +[[https://code.visualstudio.com/docs/python/python-tutorial|Visual studio et Python 3 Tutoriel EN]]
 +
 +[[https://learn.microsoft.com/fr-fr/visualstudio/install/install-visual-studio?view=vs-2022| Installation visual studio FR]]
 +
  
 == Notepad++ == == Notepad++ ==
  
 [[https://www.fabricecourt.com/formation/notepad-trucs-et-astuces/|ici]][[https://nliautaud.developpez.com/tutoriels/web/notepadplusplus-guide-pratique/options/| Et ici]] [[https://www.fabricecourt.com/formation/notepad-trucs-et-astuces/|ici]][[https://nliautaud.developpez.com/tutoriels/web/notepadplusplus-guide-pratique/options/| Et ici]]
 +
 +== Thonny ==
 +
 +[[https://thonny.org/|{{ :capture_d_ecran_du_2025-02-02_17-38-46.png?direct&300 |}}]]
 +
 +Facile à démarrer. [[https://thonny.org/|Thonny]] est livré avec Python 3.10 intégré, donc un seul installateur simple est nécessaire et vous êtes prêt à apprendre la programmation. (Vous pouvez également utiliser une installation Python distincte, si nécessaire.) L'interface utilisateur initiale est dépourvue de toutes les fonctionnalités qui peuvent distraire les débutants.
 +
 +== PyCharm ==
 +
 +[[start:programmation:pycharm|PyCharm]]
 +
 +== Anaconda ==
 +
 +[[start:programmation:python:anaconda|Anaconda]]
 +
 +== IDE Python3 en ligne ==
 +
 +[[https://www.online-python.com/|IDE Python 3 en ligne ]]
 +
 +== Transformer un programme Python main.py en main.exe ==
 +
 +[[start:python:pointexe|Python en exe]]
  
 ===== Python le langage pour commencer===== ===== Python le langage pour commencer=====
-     * [[http://apprendre-python.com/page-apprendre-conditions-structures-conditionnelles-if-else-python-cours-debutant|"If else " en Python]]   +     * [[https://www.pierre-giraud.com/python-apprendre-programmer-cours/condition-if-elif-else/|"If else " en Python]] --- [[debuter_en_python:if|If else " en Python]] 
-     * [[https://openclassrooms.com/courses/apprenez-a-programmer-en-python/les-structures-conditionnelles|un autre cours]] +     * [[https://openclassrooms.com/fr/courses/7168871-apprenez-les-bases-du-langage-python|un autre cours]] 
-     * [[https://youtu.be/aM3OREE1yOw|Une vidéo sur if-else en python ]]  +     * [[https://youtu.be/bC1ImUPR29E?si=BEftV2nbBl-BUt_W|Une vidéo sur if-else en python ]]  
-     * [[https://youtu.be/04GD_p8j_iA|Les tableaux en Python 28 mn FR]]   *[[https://python-django.dev/page-apprendre-listes-list-tableaux-tableaux-liste-array-python-cours-debutant|Les tableaux ou listes en Pyton FR]] +     * [[https://youtu.be/GiKdetLM73E?si=D8QctEmP_E_6yCtT|Les tableaux en Python 28 mn FR]]   *[[https://youtu.be/kyxF5eH3Kic?si=BdniIP6YueAIcmbK|Les tableaux ou listes en Pyton FR]] 
-     *[[https://www.youtube.com/watch?v=v7Ww9NTCtq8|Les boucles en python FR ]]  *[[https://python-django.dev/page-apprendre-boucles-python-loop|Boucle For... While... Range... FR ]]+     *[[https://www.youtube.com/watch?v=v7Ww9NTCtq8|Les boucles en python FR ]]  *[[https://python.doctor/page-apprendre-boucles-python-loop|Boucle For... While... Range... FR ]]
      *[[https://python.developpez.com/cours/TutoSwinnen/?page=page_7|Les types « integer » et « long »]]      *[[https://python.developpez.com/cours/TutoSwinnen/?page=page_7|Les types « integer » et « long »]]
 +     *[[debuter_en_python:POO|Python3 et la programmation Objets : POO FR]]
 +     *[[https://www.hackinscience.org/|Apprendre Python 3 en ligne avec Hackinscience FR]]
 +     *[[https://www.w3schools.com/quiztest/quiztest.asp?qtest=PYTHON|Quiz-Test-Python3 EN]]
 +     *[[start:python:cours|Cours Python3]]
  
 ===== Python et Minecraft ===== ===== Python et Minecraft =====
Ligne 94: Ligne 159:
      * [[https://raspberry-pi.developpez.com/cours-tutoriels/minecraft/debuter/|Python et Minecraft en Français]]      * [[https://raspberry-pi.developpez.com/cours-tutoriels/minecraft/debuter/|Python et Minecraft en Français]]
  
-=== Doc Tuto - Livre  === +=== Doc Tuto - Livre  ===      
- +    {{ :apprendre_a_coder_grace_a_minecraft_ed1_v1-ch5.pdf | Minecraft :Interagir avec les circuits électroniques Ch5}} 
- +    * [[ https://www.micropython.fr/ |le langage Python et MicroPython ]] 
-     * -1- [[http://78.204.53.180:16557/share/1pPqtMYNjMPJZQQR/ |Minecraft apprendre_a_coder_grace_a_minecraft]] +    * [[https://docs.python.org/fr/3/|Doc python 3.x officielle FR]] 
-     -2- [[http://78.204.53.180:16557/share/hgTCFegdQ_mgWZud/Apprendre_a_coder_grace_a_Minecraft_ed1_v1-Ch5.pdf  | Minecraft :Interagir avec les circuits électroniques Ch5]] +    * [[https://zestedesavoir.com/tutoriels/pdf/846/pygame-pour-les-zesteurs.pdf|pygame-pour-les-zesteurs.pdf FR]] 
-     -3- [[ http://78.204.53.180:16557/share/2TQhPcWruAnwLeTQ |le langage Python et MicroPython ]] +    * [[http://chanterie37.fr/fablab37110/doku.php?id=start:rasberry:minecraft#python_et_minecraft|Minecraft et le raspberry]]
-     -4- [[https://docs.python.org/fr/3/|Doc python 3.x officielle FR]] +
-     -5- [[https://zestedesavoir.com/tutoriels/pdf/846/pygame-pour-les-zesteurs.pdf|pygame-pour-les-zesteurs.pdf FR]] +
- +
-===== Les programmes du Tuto en Python  =====+
  
-     * [[http://78.204.53.180:16557/share/Cr5bWB40dCdbFCAa/|Les programmes du tuto PDF  FR]] 
  
 ===== Videos ===== ===== Videos =====
Ligne 125: Ligne 185:
  
 ===== Programmes d'essais en Python 3 ===== ===== Programmes d'essais en Python 3 =====
 +
 +== Menu 1 en mode texte tres simple Python3 ==
 +
 +<code python py menu002.py>
 +menu_options = {
 +    1: 'Option 1',
 +    2: 'Option 2',
 +    3: 'Option 3',
 +    4: 'Exit',
 +}
 +
 +def print_menu():
 +    for key in menu_options.keys():
 +        print (key, '--', menu_options[key] )
 +
 +def option1():
 +     print('Handle option \'Option 1\'')
 +
 +def option2():
 +     print('Handle option \'Option 2\'')
 +
 +def option3():
 +     print('Handle option \'Option 3\'')
 +
 +if __name__=='__main__':
 +    while(True):
 +        print_menu()
 +        option = ''
 +        try:
 +            option = int(input('Enter your choice: '))
 +        except:
 +            print('Wrong input. Please enter a number ...')
 +        #Check what choice was entered and act accordingly
 +        if option == 1:
 +           option1()
 +        elif option == 2:
 +            option2()
 +        elif option == 3:
 +            option3()
 +        elif option == 4:
 +            print('Thanks message before exiting')
 +            exit()
 +        else:
 +            print('Invalid option. Please enter a number between 1 and 4.')
 +</code>
  
 == Menu en mode texte python3 == == Menu en mode texte python3 ==
Ligne 135: Ligne 240:
 # Import the necessary packages # Import the necessary packages
 # pip install console-menu # pip install console-menu
 +# Modifier par GL le 15/01/2022
 ############################# #############################
  
Ligne 176: Ligne 282:
 <code python py calc3.py> <code python py calc3.py>
 ## Programme de calculatrice tres simple pour demarrer en python  ## Programme de calculatrice tres simple pour demarrer en python 
-## GL 01/2022 +## Modifier par GL 01/2022 
 ############# #############
  
Ligne 425: Ligne 531:
 fen.mainloop() # Gestion de la fenêtre fen.mainloop() # Gestion de la fenêtre
 </code> </code>
 +
 +
 +== lire un fichier texte ==
 +
 +<code python py testfich001.py>
 +#! /usr/bin/env python
 +# coding: utf-8
 +
 +menu_options = {
 +    1: 'Option 1',
 +    2: 'Option 2',
 +    3: 'Aide -- 3',
 +    4: 'Exit',
 +}
 +
 +def print_menu():
 +    for key in menu_options.keys():
 +        print (key, '--', menu_options[key] )
 +
 +def option1():
 +     print('Handle option \'Option 1\'')
 +
 +def option2():
 +     print('Handle option \'Option 2\'')
 +
 +def option3():
 + f = open('aide001.txt', 'r')
 + data = f.read()
 + f.close
 + print(data)
 +
 +if __name__=='__main__':
 +    while(True):
 +        print_menu()
 +        option = ''
 +        try:
 +            option = int(input('Enter your choice: '))
 +        except:
 +            print('Wrong input. Please enter a number ...')
 +        #Check what choice was entered and act accordingly
 +        if option == 1:
 +           option1()
 +        elif option == 2:
 +            option2()
 +        elif option == 3:
 +            option3()
 +        elif option == 4:
 +            print('Thanks message before exiting')
 +            exit()
 +        else:
 +            print('Invalid option. Please enter a number between 1 and 4.')
 +
 +</code>
 +
 +**Inserer le fichier texte "aide001.txt" dans le meme repertoire que le programme ci-dessus **
 +
 +<code txt aide001.txt>
 +Ceci est un fichier d aide à completer suivant les besoins :
 +
 +une introduction  :
 +
 +Python (prononcé /pi.tɔ̃/) est un langage de programmation interprété, multi-paradigme et multiplateformes. 
 +
 +Il favorise la programmation impérative structurée, fonctionnelle et orientée objet. 
 +
 +Il est doté d'un typage dynamique fort, d'une gestion automatique de la mémoire par ramasse-miettes et d'un système de gestion d'exceptions ; 
 +
 +il est ainsi similaire à Perl, Ruby, Scheme, Smalltalk et Tcl.
 +
 +Le langage Python est placé sous une licence libre proche de la licence BSD3 et fonctionne sur la plupart des plates-formes informatiques, des smartphones aux ordinateurs centraux4,
 +de Windows à Unix avec notamment GNU/Linux en passant par macOS,  ou encore Android, iOS, et peut aussi être traduit en Java ou .NET. Il est conçu pour optimiser la productivité 
 +des programmeurs en offrant des outils de haut niveau et une syntaxe simple à utiliser.
 +
 +Il est également apprécié par certains pédagogues qui y trouvent un langage où la syntaxe, clairement séparée des mécanismes de bas niveau, permet une initiation aisée aux concepts de base de la programmation5.
 +</code>
 +
 +===== Exemple Pygame =====
 +[[start:preparation:python:balle|Programme avec Pygame ; une balle qui rebondit ]]
 +======= MicroPython =======
 +
 +[[https://www.micropython.fr/tutos_videos/05.bases_python/|les bases de microPython FR]]
 +
 +[[https://micropython.org/unicorn/| Apprendre Micropython en ligne avec Chrome FR]]
 +
 +[[https://r.search.yahoo.com/_ylt=AwrIfpT_95hmk8AFU3yPAwx.;_ylu=Y29sbwMEcG9zAzYEdnRpZAMEc2VjA3Ny/RV=2/RE=1721329792/RO=10/RU=https%3a%2f%2fle-www-live-s.legocdn.com%2fsc%2fmedia%2ffiles%2fev3-micropython%2fgetting-started-with-micropython_enau-c71ffb74b3bc8d795923bd9dad8a4344.pdf/RK=2/RS=fyXxoN7Oo43xGJjBS8WuD3f3azM-|Lego MindStormsEducation et Micropython EN]]
 +
 +[[https://le-www-live-s.legocdn.com/sc/media/files/ev3-micropython/getting-started-with-micropython_enau-c71ffb74b3bc8d795923bd9dad8a4344.pdf  |LEGO® Education SPIKE TM Principal MicroPython  EN ]]
 +
 +[[http://chanterie37.fr/perso2/Lego_Python.pdf| PDF : LEGO® Education SPIKE TM Principal MicroPython  FR ]] 
 +
 +[[https://micropython.fr/port_esp32/|micropython pour ESP32 FR]]
 +
 +{{ :start:arduino:esp32micropython.pdf |Doc FR en PDF MicroPython et ESP32}}[[https://micropython.fr|Micropython FR]]
 +
 +[[debuter_en_python:micropython2|MicroPython sur ESP8266 ou ESP32 ]]
 +
 +[[https://wokwi.com/micropython|Test Micropython avec un esp32 en Ligne sur Wokwi]]
 +
 +
 +======= CPython =======
 +
 +[[https://realpython.com/cpython-source-code-guide/| CPython Guide EN ]]
 +
 +[[https://www.geeksforgeeks.org/python-vs-cpython/| Python version CPython EN ]]
 +
 +[[https://github.com/python/cpython|CPython sur GitHub EN ]]
 +
 +[[https://gamedevacademy.org/cpython-tutorial-complete-guide/| CPython Guide 02 EN]]
 +
 +
 +======= Calculatrices utilisant Python =======
 +
 +[[https://www.numworks.com/fr/calculatrice/python/|Numworks ]][[https://play.google.com/store/apps/details?id=com.numworks.calculator|Sur votre telephone]]
 +
 +[[https://education.ti.com/-/media/ti/files/resources/ti-codes/fr/ti-codes-booklet-1.pdf|TI83 ]][[https://education.ti.com/fr|Site Texas Instruments]]
 +
 +[[https://support.casio.com/global/fr/calc/manual/GRAPHMATH+_fr/JEAWSYxeibones.html|Casio]][[https://www.casio-education.fr/|Site Casio]]
 +
 +
 +
 +
 +
  
  
/home/chanteri/www/fablab37110/data/attic/debuter_en_python.1642273249.txt.gz · Dernière modification : (modification externe)