In this python programming tutorial, we will learn how to capitalize the first letter of each word in a string. We will use one loop and title() method of python string to capitalize the first character of each word.
ReadIn this tutorial, we will learn how to find if a number is an abundant/excessive number or not using python. A number is called an abundant number or excessive number if the sum of all of its proper divisors is greater than the number itself. A proper divisor of a number is any divisor of that number other than the number itself. For example, 6 has proper divisor 1,2 and 3. All prime numbers have only one proper divisor i.e. 1 and other numbers have at least two proper divisors.
ReadPython program to check the validity of a password. We will write one program to take one password from the user and print out if it is valid or not. We will check different conditions to find if a password is valid or not.
ReadIn this python tutorial, we will learn how to count the frequency of each word in a user input string. The program will read all words, find out the number of occurrences for each word and print them out. It will also sort all the words alphabetically.
ReadIn this tutorial, we will learn how to print the current date, time and hour using python 3. Also, how to increment the day, hour or minute to the current date.
ReadIn this tutorial, we will learn how to delete a key from a dictionary in python 3. The Python dictionary is a mutable and unordered collection. Dictionaries are used to store key-value pairs in Python. Curly braces {} are used to define a dictionary in Python. Each key and its value are separated by a colon.
ReadIn this tutorial, we will learn how to find the first odd Abundant number in python. A number is called Abundant or Excessive number if its sum of all proper divisors is more than the number itself. A proper divisor is any divisor of a number other than the number itself. For a prime number, the only proper divisor is ‘1’. ‘1’ doesn’t have any proper divisor. 6 has two proper divisors 2 and 3.
ReadIn this tutorial, we will learn how to find the larger string among two user input strings in python. One string is called larger than another string if its length is greater than the length of the other string. So, we need to find out the length of a string if we want to compare it with another.
ReadPython program to find the total number of lines in a file. We will find out the total lines in a text file. With this tutorial, you will learn how to open a file and read its content in python. Python provides inbuilt methods to read, write, and delete a file.
ReadIn this tutorial, we will learn how to print an identity matrix in python. A matrix is called identity matrix if all of its diagonal elements from the upper left corner to bottom right corner is 1 and all other elements are 0. For example, the following matrices are "identity matrix" :All three matrices are consist of zeroes except the diagonal. The elements for the diagonals from the upper left to the bottom right corner are one.
Read