-
PROGRAMS
Problem Definition
Create a Python program to display all alphabets from A to Z.
Solution
This article will go through two pythonic ways to generate alphabets.
Using String module
Python's built-in string module comes with a number of useful string funct…
-
PROGRAMS
The Least Common Multiple (LCM) is the smallest positive integer that is a multiple of two or more numbers.In this article, we will be discussing how to write a Python program to find the LCM of two numbers.Method 1
One way to find the LCM of two numb…
-
PROGRAMS
The factorial of a number is the product of all the integers from 1 to that number. Mathematically, the formula for the factorial is as follows. If n is an integer greater than or equal to 1, then factorial of n is,
(n!) = 1*2*3*4....*n
Also, the factor…
-
PROGRAMS
Problem Definition
Create a Python Program to generate the multiplication table of a number.
Program
num = int(input("Enter the Number :"))
for i in range(1,11):
print("{} x {} = {}".format(num,i,num*i))
Output
Enter the Number :3
3 x 1 = 3
3 x 2 = …
-
PROGRAMS
A leap year is a year, occurring once every four years, which has 366 days including 29 February as an intercalary day. A leap year is exactly divisible by 4 except for century years (years ending with 00). The century year is a leap year only if it is p…
-
PROGRAMS
A quadratic equation is an equation of the second degree, meaning it contains at least one term that is squared. The standard form is ax² + bx + c = 0 with a, b, and c being constants or numerical coefficients, and x is an unknown variable for example 6x…
-
PROGRAMS
In Division The number which we divide is called the dividend. The number by which we divide is called the divisor. The result obtained is called the quotient. The number left over is called the remainder.
Problem Definition
Create a Python program to c…
-
PROGRAMS
ASCII, abbreviated from American Standard Code for Information Interchange, is a character encoding standard for electronic communication. ASCII codes represent text in computers, telecommunications equipment, and other devices.
Problem Definition
1] Cre…
-
PROGRAMS
Problem Definition
Create a Python program to multiply two numbers.
Program
num_1 = 2
num_2 = 3
product = num_1 * num_2
print("Product of {} and {} is {}".format(num_1, num_2,product))
Output
Product of 2 and 3 is 6
First, the two numbers are stored in …
-
PROGRAMS
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 …