python

python

How to print inverted half-pyramid in python using star

Python program to print an inverted half pyramid using star or any other character. The program will take the height or size of the pyramid and it will print the pyramid.

Read
python

Python program to find out the sum of all numbers in an array

Python program to find out the sum of all numbers in an array. The program will take the numbers to put in an array and find out the sum.

Read
python

Example to use Numpy log2 method to find natural logarithm of an array of numbers

log2 method of Numpy is used to find out the base-2 logarithm of an array of numbers. This post will show you how to use log2 method with example.

Read
python

Python program to declare variables without assigning any value

Learn how to declare variables without assigning any value in python. Whenever we create one variable in python, we assign one value to it and python defines the type automatically.

Read
python

Python numpy log10 explanation with example

Python numpy log10 method explanation with example. Learn how to use numpy log10 with a simple example.

Read
python

Python replace in numpy array more or less than a specific value

Python program to replace elements of numpy array that is more or less than a specific value.

Read
python

end parameter in python print statement and how to use it

Learn what is end parameter in python and how we can use it in print statement.

Read
python

Python program to find the percentage difference between two numbers

Two ways to find the percentage difference between two numbers in Python. We will learn how to find the positive and negative percentage differences with examples.

Read
python

Python program to calculate discount based on selling price

In this post, we will learn how to find the discount and amount to pay based on predefined discount percentage

Read
python

How to take inputs from user in Python

In this tutorial, we will learn how to take inputs from the user in python with examples of sys.stdin and input() methods of python

Read