# Category: Programs

• PROGRAMS

## Python Script To Convert A Docx File To Text File

In this article, we will learn how to convert a docx file into plain text and then save the content to txt file. For the conversion, we are going to use a third party package named docx2txt This tool attempts to generate equivalent plain text files from …

• PROGRAMS

## Python Script To Check If A Directory Exists, If Not, Create It

In this article, we will create a Python script which will check if a particular directory exists on our machine or not if not then the script will create it for us with built in Python functions. Check If A Directory Exists, If Not, Create It The OS mod…

• PROGRAMS

## Python Program To Print Numbers From 1 to 10 Using While Loop

Problem Definition Create a Python program to print numbers from 1 to 10 using a while loop. Solution In programming, Loops are used to repeat a block of code until a specific condition is met. The While loop loops through a block of code as long as a sp…

• PROGRAMS

## Python Program To Print Numbers From 1 to 10 Using For Loop

Problem Definition Create a Python program to print numbers from 1 to 10 using a for loop. Solution In programming, Loops are used to repeat a block of code until a specific condition is met. A for loop is a repetition control structure that allows you t…

• PROGRAMS

## Python Program to Find the Smallest Among Three Numbers

Problem Definition Create a Python program to find the smallest among the three given numbers, taking runtime inputs from the user. In this article, we will show you two methods to address this same problem one being the conventional way and the other be…

• PROGRAMS

## Python Program to Swap Two Numbers

Problem Definition Create a Python program to swap two numbers taking runtime inputs. Swapping means interchanging, for instance, say we have two variables holding the following values a = 10 & b = 20 after swapping they will interchange the values s…

• PROGRAMS

## Python Program to Add Two Numbers

Problem Definition Create a Python program to add two numbers and print the result, taking runtime input from the user. Solution Take input from the user save them in variables Add the numbers and print the result End Program num1 = int(input("Enter fi…

• PROGRAMS

## Python Program to Find the Largest Among Three Numbers

Problem Definition Create a Python program to find the largest among the three given numbers. In this article, we will show you two methods to address this same problem one being the conventional way and the other being the Pythonic way. Find The Largest…

• PROGRAMS

## Python program to check if a string is palindrome or not

Problem Definition Make a Python program to check if the given string is palindrome or not. A string is a palindrome if it reads same from forward as well as backward for example madam. Solution Take the input string from the user and store it in a vari…