Python program to count number of each Vowel

Here we will write a Python program to count number of each vowel in a string, sentence or a paragraph. In the program below, we have taken a string stored in ip_str. Using the method casefold() we make it suitable for caseless comparisions. Basically, this method returns a lowercased version of the string.   Python … Read more

Program to implement Linear Search in Python

What is Linear Search in Python? Linear search or sequential search is a method for finding a target value within a list. It sequentially checks each element of the list for the target value until a match is found or until all the elements have been searched. Linear search runs in at worst time and … Read more

Program to swap two numbers in Python

Today we will write a program to swap two numbers in Python, we have two ways to do it: Swap using temporary variable. Swap without using temporary variable.   Program to swap two numbers in Python using temporary variable: a = 10 b = 20 print("before swapping\na=", a, " b=", b) temp = a a … Read more