Posted in Home

Python Examples

Basic Programs:

  1. Python program to add two numbers
  2. Maximum of two numbers in Python
  3. Python Program for factorial of a number
  4. Python Program for simple interest
  5. Python Program for compound interest
  6. Python Program to check Armstrong Number
  7. Python Program for Program to find area of a circle
  8. Python program to print all Prime numbers in an Interval
  9. Python program to check whether a number is Prime or not
  10. Python Program for n-th Fibonacci number
  11. Python Program for How to check if a given number is Fibonacci number?
  12. Python Program for n\’th multiple of a number in Fibonacci Series
  13. Program to print ASCII Value of a character
  14. Python Program for Sum of squares of first n natural numbers
  15. Python Program for cube sum of first n natural numbers

Array Programs:

  1. Python Program to find sum of array
  2. Python Program to find largest element in an array
  3. Python Program for array rotation
  4. Python Program for Reversal algorithm for array rotation
  5. Python Program to Split the array and add the first part to the end
  6. Python Program for Find reminder of array multiplication divided by n
  7. Python Program to check if given array is Monotonic

List Programs:

  1. Python program to interchange first and last elements in a list
  2. Python program to swap two elements in a list
  3. Python | Ways to find length of list
  4. Python | Ways to check if element exists in list
  5. Different ways to clear a list in Python
  6. Python | Reversing a List
  7. Python program to find sum of elements in list
  8. Python | Multiply all numbers in the list
  9. Python program to find smallest number in a list
  10. Python program to find largest number in a list
  11. Python program to find second largest number in a list
  12. Python program to find N largest elements from a list
  13. Python program to print even numbers in a list
  14. Python program to print odd numbers in a List
  15. Python program to print all even numbers in a range
  16. Python program to print all odd numbers in a range
  17. Python program to print positive numbers in a list
  18. Python program to print negative numbers in a list
  19. Python program to print all positive numbers in a range
  20. Python program to print all negative numbers in a range
  21. Remove multiple elements from a list in Python
  22. Python – Remove empty List from List
  23. Python | Cloning or Copying a list
  24. Python | Count occurrences of an element in a list
  25. Python | Remove empty tuples from a list
  26. Python | Program to print duplicates from a list of integers
  27. Python program to find Cumulative sum of a list
  28. Python | Sum of number digits in List
  29. Break a list into chunks of size N in Python
  30. Python | Sort the values of first list using second list

Author:

My name is Truong Thanh, graduated Master of Information Technology and Artificial Intelligent in Frankfurt University,Germany. I create this Blog to share my experience about life, study, travel...with friend who have the same hobbies.

Leave a comment