English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The best way to learn Python is through practice with examples. This page contains examples of basic Python concepts. It is recommended that you refer to the references in these examples and try them yourself. All the programs on this page have been tested and should run on all platforms.
Python program to check if a number is positive, negative, or 0
Python program to find the largest number among three digits
Python program to convert decimal to binary, octal, and hexadecimal
Python program to find the greatest common divisor (HCF) or greatest common factor (GCD)
Python program to display the Fibonacci sequence using recursion
Python program to find the sum of natural numbers using recursion
Python program to find the factorial of a number using recursion