Author: Arpit Mandliya
- 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-678b38ffcb05e420949223/] 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-678b38ffcb165938359748/] 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-678b38ffcb4c7270846356/] 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 […]
- 23 May
Remove Comma from String in Python
💡 Outline You can remove comma from string in python by using string’sreplace() method. Syntax: [crayon-678b38ffcb58c431854460/] In this tutorial, we will take a sample string with a couple of commas in it and we will see some methods to remove comma from string in Python. Using replace() function to remove comma from string in Python […]