-
WEB DEVELOPMENT
PostgreSQL is undoubtedly one of the most popular and efficient open-source relational database management system powering millions of applications.These days a database backup mechanism is essential for any project onboard. Luckily PostgreSQL comes with…
-
WEB DEVELOPMENT
Peer authentication failed error arrives when you try to login to your PostgreSQL user but authentication fails because by default psql connects over UNIX sockets using peer authentication instead of password authentication.In this article we will learn …
-
PROGRAMS
Problem DefinitionCreate a python program to reverse a sentence.AlgorithmTake a string as input.Convert the sentence into a list of words.Join the list in the reverse order which ultimately is the reversed sentence.Programsentence = "dread it run from it…
-
PROGRAMS
The octal numeral system, or oct for short, is the base-8 number system and uses the digits 0 to 7. The main characteristic of an Octal Numbering System is that there are only 8 distinct counting digits from 0 to 7 with each digit having a weight or valu…
-
PROGRAMS
A binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols 0 and 1.The decimal numeral system is the standard system for denoting integer and non-integer numbers.All decimal numbers can be con…
-
PROGRAMS
In this article, we will go over different ways to generate pyramids and patters in Python.Half pyramid of asterisksdef half_pyramid(rows):
for i in range(rows):
print('*' * (i+1))
half_pyramid(6)Output*
**
***
****
*****
******An alternate …
-
PROGRAMS
The factor of any number is a whole number which exactly divides the number into a whole number without leaving any remainder.For example, 3 is a factor of 9 because 3 divides 9 evenly leaving no remainder.ProblemCreate a Python program to find all the f…
-
PROGRAMS
Problem DefinitionCreate a Python program to take two numbers from the user one being the base number another the exponent then calculate the power.Programimport math
base_number = float(input("Enter the base number"))
exponent = float(input("Enter the …
-
PROGRAMS
Problem DefinitionCreate a Python program to reverse a number in Python.SolutionThis article will show multiple solutions for reversing a number in Python.Reversing a number mathematicallyThe algorithm below is used to reverse a number mathematically wit…
-
PROGRAMS
Python is a versatile and user-friendly programming language that allows developers to perform various tasks with ease. In this article, we will explore a simple yet essential Python program that displays characters from A to Z. This program serves as an…