Python program to print numbers with comma as thousand separators

Let’s say your frontend is showing the same value that backend sends and if your python backend needs to send numbers with comma as the thousand separators, it is actually pretty simple. For example, if the input is 1000, it should convert it to 1,000 and if it is 100000, it should convert it to 100,000.

Read

Write a love calculator program in Java

In this tutorial, we will learn how to create one love calculator program. This program will take two names as inputs, calculates the percentage and prints it out. How the program is calculating the percentage, I am explaining below.

Read

How to print exception StackTrace in Dart

try-catch block is used to handle exceptions. The catch block can take two parameters - first one is the exception and the second one is a StackTrace object. StackTrace holds the call sequence that triggers one exception. StackTrace is created at runtime and it is an object of class StackTrace.

Read

C++ program to read student names and marks using structure

C++ program to read the names and marks of a list of students and print them using structure. This post will show you how to use a structure in C++ with an example program.

Read

C program to convert meter to yard

Length conversion is a common problem in many applications. You application is getting the value in one unit from the server and you need to convert it before showing it to the user. Or your application takes the input in one unit and convert it to another unit.

Read

Logical OR operator explanation with example in C

Logical OR is used with two operands. The definition of logical OR is that it will return true if any of the operands is true. Else, it returns false. In C programming, we don't have any boolean, so it returns 1 for true and 0 for false.

Read

How to throw an exception in Dart

We can throw an exception manually in Dart. Dart has a couple of predefined Exceptions and these are thrown automatically on any unexpected result. You can raise predefined exceptions, custom exceptions or arbitrary objects. In this post, I will quickly show you how to throw an exception in dart with examples.

Read

4 different ways in Python to create a list of objects

This post will show you 4 different ways to create a list of objects in Python. We will learn how to use append, extend and insert methods to create a list of Python objects.

Read

JavaScript find if an object is in an array of object

Finding out if an object is in an array or not is little bit tricky. indexOf doesn't work for objects. Either you need to use one loop or you can use any other methods provided in ES6. Loop is not a good option. JavaScript provides a couple of different methods that makes it more easier.

Read

Different ways in JavaScript to check if all elements of one array are in a second array

JavaScript comes with a couple of different array methods. You don't have to loop through each elements of an array to check if they are in a second array. In this post, I will show you different ways to check if all elements of an array is in another way or not. in a second array

Read