English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Tutoriel de base Python

Contrôle de flux Python

Fonctions en Python

Types de données en Python

Opérations de fichiers Python

Objets et classes Python

Dates et heures Python

Connaissances avancées Python

Manuel de référence Python

Complete Python Examples

Le meilleur moyen d'apprendre Python est par la pratique des exemples. Cette page contient des exemples sur les concepts de base de Python. Nous vous recommandons de consulter les références dans ces exemples et de les essayer personnellement. Tous les programmes sur cette page ont été testés et devraient fonctionner sur toutes les plates-formes.

  1. Un programme Python pour imprimer Hello world !

  2. Un programme Python pour additionner deux nombres

  3. Un programme Python pour trouver la racine carrée

  4. Un programme Python pour calculer la surface d'un triangle

  5. Python program to solve quadratic equations

  6. Python program to swap two variables

  7. Python program to generate random numbers

  8. Python program to convert kilometers to miles

  9. Python program to convert Celsius temperature to Fahrenheit

  10. Python program to check if a number is positive, negative, or 0

  11. Python program to check if a number is odd or even

  12. Python program to check for leap years

  13. Python program to find the largest number among three digits

  14. Python program to check for prime numbers

  15. Python program to print all prime numbers at an interval

  16. Python program to find the factorial of a number

  17. Python program to display the multiplication table

  18. Python program to print the Fibonacci sequence

  19. Python program to check Armstrong numbers

  20. Python program to find Armstrong numbers at intervals

  21. Python program to find the sum of natural numbers

  22. Python program to display using anonymous functions2power

  23. Python program to find numbers divisible by another number

  24. Python program to convert decimal to binary, octal, and hexadecimal

  25. Python program to find the ASCII value of a character

  26. Python program to find the greatest common divisor (HCF) or greatest common factor (GCD)

  27. Python program to find LCM

  28. Python program to find factors of a number

  29. Python program to create a simple calculator

  30. Python program to play cards randomly

  31. Python program to display the calendar

  32. Python program to display the Fibonacci sequence using recursion

  33. Python program to find the sum of natural numbers using recursion

  34. Python program to find the factorial of a number using recursion

  35. Python program to convert decimal to binary using recursion

  36. Python program to add two matrices

  37. Python program to transpose a matrix

  38. Python program to multiply two matrices

  39. Python program to check if a string is a palindrome

  40. Python program to remove punctuation from a string

  41. Python program to sort words in alphabetical order

  42. Python program to explain different set operations

  43. Python program to calculate the number of vowels

  44. Python program to merge emails

  45. Python program to find the size (resolution) of an image

  46. Python program for finding file hash