Author: Arpit Mandliya
- 11 June
public static void main(String[] args) – Java main method
If you have worked with Java programs before, you know that all Java programs start by running the main() method(public static void main(String[] args)). The main() method is the entry point. The signature of the main method is fixed, and each portion of the statement has significance. Why is the main method so important? The […]
- 07 June
Number guessing game in Python
A number guessing game is a common mini-project for basic programmers who have a grasp on random number generation and conditional statements with iteration. The number guessing game is based on a concept where player has to guess a number between given range. If player guesses the expected number then player wins else player loose […]
- 07 June
Check if string contains substring in C++
There are different ways to check if string contains substring in C++. Library functions are available in C++ like find() and strstr() to find the substring in a string. In this article, we will discuss multiple methods to check if a string contains a substring in C++. Using find() function to check if string contains […]
- 02 June
Find and count occurrences of substring in string in java
In this post, we will see how to find and count occurrences of substring in string in java. Using the indexOf() method The indexOf() method in java is a specialized function to find the index of the first occurrence of a substring in a string. This method has 4 overloads. [crayon-68c22a8151cc9560711036/] We will use the […]
- 31 May
Sort list alphabetically in Python
💡 Outline You can use sort() method of list to sort list alphabetically in Python [crayon-68c22a8151e63332972419/] In this tutorial, we will discuss different ways to sort a list namely using the sort() function, sorted() function, and implementing the quick sort algorithm. Use of the sort() function to sort list alphabetically in Python. The sort() method […]
- 31 May
Perfect number program in Python
According to number theory, a limb of pure mathematics that deals with integers, a Perfect Number can be defined as a positive integer whose value is equivalent to the sum of its proper positive divisors, excluding the number itself (alternatively known as aliquot sum). An example of a perfect number is the number 6, the […]
- 31 May
Convert Hex to bytes in Python
1. Introduction to the Problem Statement In software development, converting hexadecimal (hex) strings to byte objects is a frequent requirement, especially when dealing with data formats and encoding. Hexadecimal, being a base-16 numeral system, offers a compact way to represent binary data, which is often needed in computational tasks. For instance, converting the hex string […]
- 24 May
Convert float to String in C++
Learn about how to convert float to String in C++ in different wayds.
- 23 May
Print double quotes in java
💡 Outline You can print double quotes in java by escape double quotes using backslash character(\). [crayon-68c22a815238a752920145/] When you print on console using System.out.println, you use double quotes and whatever value inside double quotes is printed. But what if you want to actually print double quotes on console. In this tutorial, we will see different […]