Python3 Examples
The following examples were tested under Python 3.4.3:
- Python Hello World Example
- Python Number Summation
- Python Square Root
- Python Quadratic Equation
- Python Calculate Area of Triangle
- Python Calculate Area of Circle
- Python Random Number Generation
- Python Celsius to Fahrenheit Conversion
- Python Swap Variables
- Python if Statement
- Python Check Whether a String is a Number
- Python Check Odd or Even
- Python Check Leap Year
- Python Get Maximum Value Function
- Python Prime Number Check
- Python Output Prime Numbers Within a Specified Range
- Python Factorial Example
- Python 9x9 Multiplication Table
- Python Fibonacci Sequence
- Python Armstrong Number
- Python Decimal to Binary, Octal, Hexadecimal
- Python ASCII Code and Character Conversion
- Python Greatest Common Divisor Algorithm
- Python Least Common Multiple Algorithm
- Python Simple Calculator Implementation
- Python Generate Calendar
- Python Fibonacci Sequence Using Recursion
- Python File IO
- Python String Check
- Python String Case Conversion
- Python Calculate Number of Days in Each Month
- Python Get Yesterday's Date
- Python List Common Operations
- Python Josephus Game (Living and Dead)
- Python Five People Dividing Fish
- Python Implement Stopwatch Function
- Python Calculate Sum of Cubes of n Natural Numbers
- Python Calculate Sum of Array Elements
- Python Reverse a Specified Number of Elements in an Array
- Python Swap First and Last Elements of a List
- Python Swap Two Elements at Specified Positions in a List
- Python Reverse a List
- Python Check if Element Exists in List
- Python Clear a List
- Python Remove Duplicate Elements from List
- Python Copy a List
- Python Count Occurrences of an Element in List
- Python Calculate Sum of List Elements
- Python Calculate Product of List Elements
- Python Find Minimum Element in List
- Python Find Maximum Element in List
- Python Remove Character at Specified Position in String
- Python Check if String Contains Substring
- Python Get String Length
- Python Extract URLs from String Using Regular Expressions
- Python Execute String as Code
- Python Reverse a String
- Python String Slicing and Reversal
- Python Sort Dictionary by Key or Value
- Python Calculate Sum of Dictionary Values
- Python Remove Key/Value Pairs from Dictionary
- Python Merge Dictionaries
- Python Convert Time String to Timestamp
- Python Get Time from a Few Days Ago
- Python Convert Timestamp to Date in Specified Format
- Python Print Self-Designed Font
- Python Binary Search
- Python Linear Search
- Python Insertion Sort
- Python Quick Sort
- Python Selection Sort
- Python Bubble Sort
- Python Merge Sort
- Python Heap Sort
- Python Counting Sort
- Python Shell Sort
- Python Topological Sort
- Python Simple Banking System
- Python Remove Leading and Trailing Spaces from String
- Python Sort a List Alphabetically
- Python Simple To-Do List
More Examples
| Serial No. | Exercises |
|---|