## Loops in Python

In the previous article we have seen the Calculator implementation , now we will go through the concept of loops in Python. Looping structures are instrumental in reducing the repeated statements or complexity of code. Let us look at the example of multiplication tables. We need to write a program that accepts a user input … Read more

## Calculator program in Python

In the preceding article we have written a program to determine whether a given year is a leap year. Now we will look at a program to implement basic common calculator utility functions for user-given input numbers for whichever operation is selected. If we imagine a calculator and it’s working, we understand that there needs … Read more

## Leap Year Program in Python

In the previous article we have seen the programs and logic relating to figuring out the largest of three numbers provided by user, in this article we will look at how to implement Leap Year logic in Python. Leap year is the year in which an additional day exists in February, and occurs about every … Read more

## Largest of Three numbers program in Python

In the previous article we explored a problem involving a python game utilizing Even or Odd Logic, now we need to write a program to accept three numbers from the user and then automatically provide to us the largest of the three numbers. Suppose the user provides the program the numbers: a=10, b= 15, c=7 … Read more

## Even-Odd problem in Python

Previously we have looked at the conditional statements in Python, In this article we will examine a problem related to even or odd concept. In this particular case of two examples imagine a game where you and your opponent are playing, and we are given a number of points. In the first example we have … Read more

## Find Last Digit in Python

In the previous article we have gone through the sum of n digits problem, we continue in this article with a look at another common problem which is finding out the last digit. Suppose a user enters the number 234, it would return 4. If a user entered 1000 it would return a zero. A … Read more

## Days Before N Days in Python

In the previous article we explored the sum of Natural Numbers in Python. Suppose we are given some days, each number means a successive different day for example: Sunday represents 0, 1 represents Monday, 2 represents Tuesday, 3 represents Wednesday, 4 represents Thursday, 5 represents Friday, 6 represents Saturday. The program calculates the number of … Read more

## Sum of Natural Numbers in Python

In the previous article we have explored Geometric Progression in Python. Now we will start looking at various common programs to further our understanding of Python such as Sum of Natural Numbers, Finding Last Digits or Days Before N number of Days. In this article we will explore the concept of Sum of Natural Numbers … Read more

## Logical Operators in Python

In the previous article we have explored the various Arithmetic operations that can be utilized in Python, in this article we will further elaborate on logical operations that can be performed on files within Python. Logical operators in python are symbols or word used to combine expressions in such a way that the value of the … Read more

## Python Integers: Type Casting and Doubling Integers | Swapping Values | Concatenation of Integers

In this article we will revise the Python Integer concepts we have previously gone through in while discussing Integer data types, we will have a look at how to solve common Integer problems involving type casting/conversion, doubling, swapping of integer values and the concatenation of integer values in Python. Typecasting and doubling Python Integers problem … Read more