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

Tutorial Básico do Python

Controle de Fluxo do Python

Função do Python

Tipos de Dados do Python

Operações de Arquivos do Python

Objetos e Classes do Python

Data e Hora do Python

Conhecimentos Avançados do Python

Manual de Referência do Python

Python example complete

A melhor maneira de aprender Python é através da prática de exemplos. Esta página contém exemplos de conceitos básicos do Python. Recomenda-se consultar as referências destes exemplos e tentá-los pessoalmente. Todos os programas desta página foram testados e devem funcionar em todas as plataformas.

  1. Programa Python para imprimir Hello world!

  2. Programa Python para somar dois números

  3. Programa Python para encontrar a raiz quadrada

  4. Programa Python para calcular a área do triângulo

  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 leap years

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

  14. Python program to check 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 using 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 divisor (GCD)

  27. Python program to find LCM

  28. Python program to find the 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 strings

  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 used to find file hash