Python programs
- 13 January
Count number of characters in a string in python
In this post, we will see how to count number of characters in a String in Python. We can think of strings as a collection of characters, with every character at a given index. Ways to count the number of characters in a string in Python In this tutorial, we will find out the total […]
- 28 October
How to decrement for loop in python
We use the for loop widely in the programming world. Most programs, whether highly complex or not, contain this loop. Sometimes, depending on the conditions, we need to decrement the loop. This article focuses on the ways to decrement the for loop in Python. What is for loop in Python? The for loop is a […]
- 19 June
Calculator program in Python
A simple Calculator can be utilized to carry out the four basic arithmetic operations namely addition, division, multiplication, and subtraction depending on the input of the user. This tutorial demonstrates how to create a simple Calculator in Python. Using the while loop along with the if...else conditional statement. To implement a simple Calculator program in […]
- 07 June
Number guessing game in Python
A number guessing game is a common mini-project for basic programmers who have a grasp on random number generation and conditional statements with iteration. The number guessing game is based on a concept where player has to guess a number between given range. If player guesses the expected number then player wins else player loose […]
- 31 May
Perfect number program in Python
According to number theory, a limb of pure mathematics that deals with integers, a Perfect Number can be defined as a positive integer whose value is equivalent to the sum of its proper positive divisors, excluding the number itself (alternatively known as aliquot sum). An example of a perfect number is the number 6, the […]