python

Python example to print the function name as string with __name__ and __qualname__

Python program to get the function name as a string. We will learn how to use the __name__ and __qualname__ attributes to get the name of a function in this post with example.

Read
python

3 different Python programs to get a string after a substring

Python program to get a string after a specific substring. We will learn three different ways to get the string after a given substring of a string in Python.

Read
python

Python assert statement explanation with examples

Python assert statement explanation with examples. This post will explain to you what is assert statement and how it works in Python with examples.

Read
c#

C# program to multiply two numbers in different ways

C# program to multiply two numbers. This post will show you how to multiply two pre-defined numbers and two user-given numbers in C# with examples.

Read
c#

C# program to print the Pascal's triangle with user input height

C# program to print the Pascal's triangle with user input height. This program will take the height of the triangle as input from the user and print the Pascal's triangle.

Read
python

3 different Python programs to remove the first character of string

Python program to remove the first character of a string in 3 different ways. We will learn how to do it by using string slicing, split and with the replace method in Python.

Read
java

How to remove all white spaces from a file in Java

Java program to remove all white spaces from a file. This program will show you how to read a text file line by line and how to remove all white spaces from the lines of this file with an example.

Read
java

Java program to print an upper triangular matrix

Java program to print an upper triangular matrix. This program will take one matrix as its input and convert it to an upper triangular matrix.

Read
java

Java program to print odd numbers from 1 to 100

Java program to print odd numbers from 1 to 100 or in a given range. We will learn three different ways to print all odd numbers in a user-given range using Java.

Read
java

Java program to convert an image to Base64 in 2 different ways

Learn how to convert an image to Base64 in 2 different ways in Java. We will use ImageIO and nio.file.Files to do the Base64 conversion with examples in this post.

Read