This page contains the list of Python programming examples which covers the concepts including basic and simple python programs, number programs, string programs, List Programs, series programs etc.

**TIP:** Please visit Python Tutorial to learn Python Programming with practical examples.

## Python Programming Examples

This section covers the basic and simple python programming examples.

- Sample Hello World Program
- How to add Two Numbers
- Arithmetic Operations
- Calendar Program
- Cube of a Number
- Largest of Two Numbers
- Largest of Three Numbers
- Print Natural number from 1 to N
- Print Natural Number in Reverse Order
- Sum and Average of Natural Numbers
- Leap Year
- Odd or Even
- Even Numbers from 1 to 100
- Odd Numbers from 1 to 100
- Positive or Negative
- Profit Or Loss
- Square of a Number
- Square root of a Number
- Compound Interest
- Number is Divisible by 5 and 11
- Power of a Number
- Multiplication Table
- Roots of a Quadratic Equation
- Student Grade
- Simple Interest
- Electricity Bill
- Total Average and Percentage of Five Subjects

### Python Sum Programs

The following Python programs will find Sum of

## Advanced Python Number Programs

The following python programming examples are helpful to work with Numbers

- Armstrong Number
- Count Number of Digits in a Number
- Fibonacci Series program
- Factors of a Number
- Factorial of a Number
- First Digit of a Number
- GCD of Two Numbers
- Last Digit in a Number
- LCM of Two Numbers
- Natural Numbers in Reverse Order
- Palindrome Program
- Palindrome numbers from 1 to 100
- Perfect Number
- Prime Number
- Prim Numbers from 1 to 100
- Prime Factors of a Number
- Reverse a Number
- Strong Number
- Strong Numbers from 1 to 100
- Sum of Digits in a Number
- Swap Two Numbers

## Python Programming examples on Characters

Below python examples are used to work on characters

- Alphabet or not
- Alphabet or Digit
- Character is an Alphabet, Digit or Special Character
- Digit or Not
- Lowercase or not
- Lowercase or Uppercase
- Uppercase or not
- Vowel or Consonant

## Python String Programs

The following are the list of python programming examples on strings.

- ASCII Value of a Single Character
- ASCII Value of Total Characters in a String
- Concatenate Strings
- Convert String to Uppercase
- Convert String to Lowercase
- Copy String
- Counting Occurrence of a Character in a String
- Count Total Characters in a String
- Count Total Number of Words in a String
- Counting Vowels in a String
- Count Vowels and Consonants in a String
- Count Alphabets Digits and Special Characters in a String
- First Occurrence of a Character in a String
- Last Occurrence of a Character in a String
- Palindrome or Not
- Print Characters in a String
- Replace Blank Space with Hyphen in a String
- Replace Characters in a String
- Remove Odd Characters in a String
- Remove Odd Index Characters in a String
- Removing First Occurrence of a Character in a String
- Remove Last Occurred Character in a String
- Reverse a String
- String Length
- Total Occurrence of a Character in a String
- Toggle Characters Case in a String

## Python List Programs

Following are the List of Python Examples on Lists.

- Add two Lists
- Arithmetic Operations on Lists
- Count Even and Odd Numbers in a List
- Count Positive and Negative Numbers in a List
- Largest Number in a List
- Largest and Smallest Number
- Length of a List
- Print Elements in a List
- Print Even Numbers in a List
- Printing Odd Numbers
- Print Positive Numbers
- Print Negative Numbers
- Put Even and odd Numbers in Separate List
- Put Positive and Negative Numbers in Separate List
- Reverse List Items
- Second Largest Number in a List
- Sort Elements in Ascending Order
- Smallest Element in a List
- Sum of All Elements
- Sum of Even and Odd Numbers in a List

## Python Dictionary Programs

- Add Key-Value Pair to a Dictionary
- Check if a Given key exists in a Dictionary
- Count words in a String using Dictionary
- Create Dictionary of keys from 1 to n and values are square of keys
- Create Dictionary of Numbers 1 to n in (x, x*x) form
- Map two lists into a Dictionary
- Merge Two Dictionaries
- Multiply All Items in a Dictionary
- Remove Given Key from a Dictionary
- Sum of Items in a Dictionary

## Python Examples on Area and Volume

This sections covers python programs on Areas, Volume and Surface Area

### Area

- Circle
- Diameter, Circumference, and Area Of a Circle
- Equilateral Triangle
- Check Triangle is Valid or Not
- Find angle of a Triangle if two angles are given
- Triangle
- Triangle area using base and height
- Trapezoid
- Area of a Rectangle using length and width
- Perimeter of a Rectangle using length and width
- Rectangle
- Right Angled Triangle

### Volume and Surface Area

## Python Programs on Series

- Sum of Arithmetic Progression Series
- Sum of Geometric Progression Series
- Find Sum of Series 1²+2²+3²+….+n²
- Sum of Series 1³+2³+3³+….+n³

## Python Pattern Programs

The following Python Programming examples show you the pattern programs. This section uses Star patterns and 0, 1 patterns.

- Bubble Sort
- 1 and 0 in Alternative Columns
- 1 and 0 in Alternative Rows
- Box Pattern of Numbers 1 and 0
- Exponentially Increasing Star Pattern
- Floyd’s Triangle
- Hollow Box Pattern of Numbers of 1 and 0
- Hollow Rectangle Star Pattern
- Square Star Hollow Pattern
- Inverted Right Triangle of Numbers
- Inverted Right Triangle Star Pattern
- Mirrored Right Triangle Star Pattern
- Rectangle Star Pattern
- Reverse Mirrored Right Triangle Star Pattern
- Right Triangle Number Pattern
- Right Angled Triangle Star Pattern
- Square Star Pattern
- Square Number Pattern

Thank You for Visiting Our Blog