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

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

Common String Operations in Python

In the previous article we have seen some of the list operations and string operations in python. Now we will look at some more vital string operations, keywords or functions in Python. Transformation/Manipulation of Strings There are a number of fun methods that we can use to transform our string text. Among those more important for … Read more

Important Methods of Dictionaries in Python

In the previous article we have looked at the definition, structure and various ways to add or remove different aspects of the Dictionary data type. In this article, we will continue to explore more about the Dictionary data type in Python along with operations such as len( ), copy( ) ,items ( ), fromkeys ( … Read more